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/2000-February/002213.html below:

Garbage collection patches for Python (fwd)

[Python-Dev] Malloc interface (was: [Patches] Re: Garbage collection patches for Python (fwd) [Python-Dev] Malloc interface (was: [Patches] Re: Garbage collection patches for Python (fwd)Vladimir Marangozov Vladimir.Marangozov@inrialpes.fr
Mon, 14 Feb 2000 12:43:19 +0100 (CET)
Fredrik Lundh wrote:
> 
> Vladimir Marangozov wrote:
> > PyMem_XDEL is very rare in the distribution...
> 
> "if (p) free(p)" is quite common, though.
> 
> > Okay, so you can use PyMem_DEL directly.
> 
> which means that PyMem_DEL works just
> fine for NULL pointers on almost all plat-
> forms, while PyMem_XDEL works on all
> platforms, but is slower if the pointer is
> usually not NULL.
> 
> seems a bit messy to me...
> 
> > If your point is to remove it, or to rename it to PyMem_DEL in
> > the distribution
> 
> my proposal is to have only one of these,
> and force people on non-ANSI platforms
> to provide a workaround.
> 
> </F>

Agreed. So the concrete proposal is this, right?

(mymalloc.h)

...
#define PyMem_FREE(p)	free((ANY *)p)
...

#define PyMem_DEL(p)	PyMem_FREE(p)
#define PyMem_XDEL(p)	PyMem_FREE(p)  /* obsolete */

-- 
       Vladimir MARANGOZOV          | Vladimir.Marangozov@inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252



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