- 09 May, 2010 1 kayıt (commit)
-
-
Antoine Pitrou yazdı
-
- 28 Eyl, 2009 1 kayıt (commit)
-
-
Kristján Valur Jónsson yazdı
The debug memory api now keeps track of which external API (PyMem_* or PyObject_*) was used to allocate each block and treats any API violation as an error. Added separate _PyMem_DebugMalloc functions for the Py_Mem API instead of having it use the _PyObject_DebugMalloc functions.
-
- 23 Mar, 2009 1 kayıt (commit)
-
-
Antoine Pitrou yazdı
untrackable objects are not tracked by the garbage collector. This can reduce the size of collections and therefore the garbage collection overhead on long-running programs, depending on their particular use of datatypes. (trivia: this makes the "binary_trees" benchmark from the Computer Language Shootout 40% faster)
-
- 19 Ara, 2007 1 kayıt (commit)
-
-
Christian Heimes yazdı
#1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available.
-
- 21 Tem, 2007 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
-
- 15 Nis, 2006 1 kayıt (commit)
-
-
Tim Peters yazdı
Py_VISIT: cast the `op` argument to PyObject* when calling `visit()`. Else the caller has to pay too much attention to this silly detail (e.g., frame_traverse needs to traverse `struct _frame *` and `PyCodeObject *` pointers too).
-
- 26 Mar, 2006 1 kayıt (commit)
-
-
Tim Peters yazdı
objimpl.h, pymem.h: Stop mapping PyMem_{Del, DEL} and PyMem_{Free, FREE} to PyObject_{Free, FREE} in a release build. They're aliases for the system free() now. _subprocess.c/sp_handle_dealloc(): Since the memory was originally obtained via PyObject_NEW, it must be released via PyObject_FREE (or _DEL). pythonrun.c, tokenizer.c, parsermodule.c: I lost count of the number of PyObject vs PyMem mismatches in these -- it's like the specific function called at each site was picked at random, sometimes even with memory obtained via PyMem getting released via PyObject. Changed most to use PyObject uniformly, since the blobs allocated are predictably small in most cases, and obmalloc is generally faster than system mallocs then. If extension modules in real life prove as sloppy as Python's front end, we'll have to revert the objimpl.h + pymem.h part of this patch. Note that no problems will show up in a debug build (all calls still go thru obmalloc then). Problems will show up only in a release build, most likely segfaults.
-
- 04 Mar, 2006 1 kayıt (commit)
-
-
Neal Norwitz yazdı
-
- 01 Mar, 2006 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
- 16 Şub, 2006 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
- 15 Şub, 2006 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
- 26 Ock, 2006 1 kayıt (commit)
-
-
Barry Warsaw yazdı
by Matt Messier).
-
- 22 Tem, 2005 1 kayıt (commit)
-
-
Georg Brandl yazdı
-
- 15 Tem, 2004 1 kayıt (commit)
-
-
Tim Peters yazdı
implementation it's used in must give its arguments specific names.
-
- 14 Tem, 2004 1 kayıt (commit)
-
-
Jim Fulton yazdı
tp_traverse handlers. (Tim made me do it. ;)
-
- 17 Nis, 2003 1 kayıt (commit)
-
-
Guido van Rossum yazdı
- Call this in Py_Finalize(). - Expand the Misc/NEWS text on PY_LONG_LONG.
-
- 12 Agu, 2002 1 kayıt (commit)
-
-
Mark Hammond yazdı
Thanks to Skip Montanaro and Kalle Svensson for the patches.
-
- 07 Tem, 2002 1 kayıt (commit)
-
-
Tim Peters yazdı
+ I'm not sure what to do about configure.in. Left it alone. + Ditto pyexpat.c. Fred or Martin will know what to do.
-
- 02 Tem, 2002 2 kayıt (commit)
-
-
Tim Peters yazdı
This was mostly a matter of adding comments and light code rearrangement. Upon untracking, gc_next is still set to NULL. It's a cheap way to provoke memory faults if calling code is insane. It's also used in some way by the trashcan mechanism.
-
Tim Peters yazdı
object should now have a well-defined gc_refs value, with clear transitions among gc_refs states. As a result, none of the visit_XYZ traversal callbacks need to check IS_TRACKED() anymore, and those tests were removed. (They were already looking for objects with specific gc_refs states, and the gc_refs state of an untracked object can no longer match any other gc_refs state by accident.) Added more asserts. I expect that the gc_next == NULL indicator for an untracked object is now redundant and can also be removed, but I ran out of time for this.
-
- 04 May, 2002 1 kayıt (commit)
-
-
Neil Schemenauer yazdı
-
- 28 Nis, 2002 1 kayıt (commit)
-
-
Tim Peters yazdı
As threatened, PyMem_{Free, FREE} also invoke the object deallocator now when pymalloc is enabled (well, it does when pymalloc isn't enabled too, but in that case "the object deallocator" is plain free()). This is maximally backward-compatible, but it leaves a bitter aftertaste. Also massive reworking of comments.
-
- 13 Nis, 2002 1 kayıt (commit)
-
-
Tim Peters yazdı
Added code to call this when PYMALLOC_DEBUG is enabled, and envar PYTHONMALLOCSTATS is set, whenever a new arena is obtained and once late in the Python shutdown process.
-
- 12 Nis, 2002 2 kayıt (commit)
-
-
Tim Peters yazdı
all the same within the #ifdef WITH_PYMALLOC block.
-
Neil Schemenauer yazdı
it's enabled. Allow PyObject_Del, PyObject_Free, and PyObject_GC_Del to be used as function designators. Provide source compatibility macros. Make PyObject_GC_Track and PyObject_GC_UnTrack functions instead of trivial macros wrapping functions.
-
- 28 Mar, 2002 1 kayıt (commit)
-
-
Neil Schemenauer yazdı
-
- 22 Mar, 2002 1 kayıt (commit)
-
-
Neil Schemenauer yazdı
and not pymalloc. Add the functions PyMalloc_New, PyMalloc_NewVar, and PyMalloc_Del that will use pymalloc if it's enabled. If pymalloc is not enabled then they use the standard malloc (PyMem_*).
-
- 18 Mar, 2002 2 kayıt (commit)
-
-
Neil Schemenauer yazdı
-
Neil Schemenauer yazdı
malloc() and free() don't change.
-
- 28 Şub, 2002 1 kayıt (commit)
-
-
Tim Peters yazdı
alignment gimmick. David Abrahams notes that the standard "long double" actually requires stricter alignment than "double" on some Tru64 box. On my box and yours <wink>, it's the same, so no harm done on most boxes.
-
- 11 Eki, 2001 1 kayıt (commit)
-
-
Tim Peters yazdı
The platform requires 8-byte alignment for doubles, but the GC header was 12 bytes and that threw off the natural alignment of the double members of a subtype of complex. The fix puts the GC header into a union with a double as the other member, to force no-looser-than double alignment of GC headers. On boxes that require 8-byte alignment for doubles, this may add pad bytes to the GC header accordingly; ditto for platforms that *prefer* 8-byte alignment for doubles. On platforms that don't care, it shouldn't change the memory layout (because the size of the old GC header is certainly greater than the size of a double on all platforms, so unioning with a double shouldn't change size or alignment on such boxes).
-
- 07 Eki, 2001 1 kayıt (commit)
-
-
Tim Peters yazdı
This simplifies the rounding in _PyObject_VAR_SIZE, allows to restore the pre-rounding calling sequence, and allows some nice little simplifications in its callers. I'm still making it return a size_t, though.
-
- 06 Eki, 2001 2 kayıt (commit)
-
-
Tim Peters yazdı
As Guido suggested, this makes the new subclassing code substantially simpler. But the mechanics of doing it w/ C macro semantics are a mess, and _PyObject_VAR_SIZE has a new calling sequence now. Question: The PyObject_NEW_VAR macro appears to be part of the public API. Regardless of what it expands to, the notion that it has to round up the memory it allocates is new, and extensions containing the old PyObject_NEW_VAR macro expansion (which was embedded in the PyObject_NEW_VAR expansion) won't do this rounding. But the rounding isn't actually *needed* except for new-style instances with dict pointers after a variable-length blob of embedded data. So my guess is that we do not need to bump the API version for this (as the rounding isn't needed for anything an extension can do unless it's recompiled anyway). What's your guess?
-
Tim Peters yazdı
pad memory to properly align the __dict__ pointer in all cases. gcmodule.c/objimpl.h, _PyObject_GC_Malloc: + Added a "padding" argument so that this flavor of malloc can allocate enough bytes for alignment padding (it can't know this is needed, but its callers do). typeobject.c, PyType_GenericAlloc: + Allocated enough bytes to align the __dict__ pointer. + Sped and simplified the round-up-to-PTRSIZE logic. + Added blank lines so I could parse the if/else blocks <0.7 wink>.
-
- 02 Eki, 2001 1 kayıt (commit)
-
-
Guido van Rossum yazdı
instances). Also added GC support to various auxiliary types: super, property, descriptors, wrappers, dictproxy. (Only type objects have a tp_clear field; the other types are.) One change was necessary to the GC infrastructure. We have statically allocated type objects that don't have a GC header (and can't easily be given one) and heap-allocated type objects that do have a GC header. Giving these different metatypes would be really ugly: I tried, and I had to modify pickle.py, cPickle.c, copy.py, add a new invent a new name for the new metatype and make it a built-in, change affected tests... In short, a mess. So instead, we add a new type slot tp_is_gc, which is a simple Boolean function that determines whether a particular instance has GC headers or not. This slot is only relevant for types that have the (new) GC flag bit set. If the tp_is_gc slot is NULL (by far the most common case), all instances of the type are deemed to have GC headers. This slot is called by the PyObject_IS_GC() macro (which is only used twice, both times in gcmodule.c). I also changed the extern declarations for a bunch of GC-related functions (_PyObject_GC_Del etc.): these always exist but objimpl.h only declared them when WITH_CYCLE_GC was defined, but I needed to be able to reference them without #ifdefs. (When WITH_CYCLE_GC is not defined, they do the same as their non-GC counterparts anyway.)
-
- 03 Eyl, 2001 1 kayıt (commit)
-
-
Neil Schemenauer yazdı
disabled. Obviously everyone enables the GC. :-)
-
- 29 Agu, 2001 1 kayıt (commit)
-
-
Neil Schemenauer yazdı
the old flag to still compile. Remove the PyType_BASICSIZE and PyType_SET_BASICSIZE macros. Add PyObject_GC_New, PyObject_GC_NewVar, PyObject_GC_Resize, PyObject_GC_Del, PyObject_GC_Track, PyObject_GC_UnTrack. Part of SF patch #421893.
-
- 03 Agu, 2001 1 kayıt (commit)
-
-
Jack Jansen yazdı
Removed duplicate definnitions of PyObject_AS_GC and PyObject_FROM_GC (occurred only if GC was off).
-
- 02 Agu, 2001 1 kayıt (commit)
-
-
Tim Peters yazdı
-
- 22 Mar, 2001 1 kayıt (commit)
-
-
Fred Drake yazdı
must now initialize the extra field used by the weak-ref machinery to NULL themselves, to avoid having to require PyObject_INIT() to check if the type supports weak references and do it there. This causes less work to be done for all objects (the type object does not need to be consulted to check for the Py_TPFLAGS_HAVE_WEAKREFS bit).
-