A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-May/065169.html below:

[Python-Dev] Cost-Free Slice into FromString constructors--Long

[Python-Dev] Cost-Free Slice into FromString constructors--Long [Python-Dev] Cost-Free Slice into FromString constructors--LongJosiah Carlson jcarlson at uci.edu
Thu May 25 18:00:44 CEST 2006
Bob Ippolito <bob at redivi.com> 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.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4