[Python-Dev] pdb segfaults in 2.5 trunk?
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue Apr 11 03:16:55 CEST 2006
Tim Peters wrote:
> The PyObject_ memory family is generally faster and more
> memory-efficient for small allocations than the PyMem_ memory family.
> Lines of source code, and encoding strings, are usually small enough
> to exploit that. The "ob" in obmalloc.c doesn't really have anything
> to do with objects either. PyMem_SmallMalloc (etc) may have been
> better names (although I doubt that ;-)).
However, if they're not exclusively for objects,
having "Object" in the name would seem to be
highly confusing, perhaps dangerously so. (Person
A writes PyObject_Alloc(some_chars), Person B
writing the code to free it thinks "What???
That can't be right!" and uses PyMem_Free.)
--
Greg
More information about the Python-Dev
mailing list