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
_______________________________________________
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

Reply via email to