Bob Ippolito <[EMAIL PROTECTED]> wrote: > One problem with buffer() is that it does a memcpy of the buffer. A > zero-copy version of buffer (a view on some object that implements > the buffer API) would be nice.
Did buffers change? I seem to remember that there were segfaulting conditions when using array and buffer due to arrays being resizable and leaving buffers pointing at ether...or is the memcpy part of the buffer 'fix'? If so, the changes in performance and memory use may surprise long-time users of buffer. - Josiah P.S. There is a possible solution to the "buffer pointing at ether due to realloc" problem, but it would rely on a non-existing (from what I understand about memory allocation) "would a realloc of pointer foo point to the same address?" Of course the other alternative is to just always alloc when resizing arrays, etc., leaving a version of the old object around until all buffers pointing to that object have been freed. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com