Martin v. Löwis <[EMAIL PROTECTED]> wrote: >> Why isn't the mark-and-sweep mechanism used for all memory >> management? > > See above - it's not implementable, because the root objects get not > tracked.
To further elaborate, the main obstacle is with extension modules. Most of them create roots and there is no defined API for the Python interpreter to find them. Perhaps a more serious problem is that CPython and 3rd party extension modules rely heavily on the fact that the GC does not move objects. There are GC strategies that perform well when faced with high object allocation rates but, AFAIK, all of them rely on moving objects. Neil _______________________________________________ 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