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/2001-April/014477.html below:

[Python-Dev] Memory management question

[Python-Dev] Memory management question [Python-Dev] Memory management questionNeil Schemenauer nas@python.ca
Fri, 27 Apr 2001 11:10:23 -0700
Guido van Rossum wrote:
> > Is there any (official) way to realloc the memory returned by
> > PyObject_NEW ?
> 
> Not if the object participates in GC.

I going to see if I can fix this for 2.2.  My current thinking is
that there should be memory management APIs for GC objects,
something like:

    PyObject_GC_New()
    PyObject_GC_NewVar()
    PyObject_GC_Realloc()
    PyObject_GC_Del()

The non-GC APIs would no longer have to check the type flags
which would be a bit of a speed win.  The _AS_GC, _FROM_GC macros
would not have to be used as much and the GC implementation would
have more freedom about how to allocate things.

  Neil



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