[Python-checkins] cpython: Issue #3329: Fix _PyObject_ArenaVirtualFree()

victor.stinner python-checkins at python.org
Sun Jul 7 03:06:31 CEST 2013


http://hg.python.org/cpython/rev/51ed51d10e60
changeset:   84473:51ed51d10e60
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Sun Jul 07 03:06:16 2013 +0200
summary:
  Issue #3329: Fix _PyObject_ArenaVirtualFree()

According to VirtualFree() documentation, the size must be zero if the "free
type" is MEM_RELEASE.

files:
  Objects/obmalloc.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -68,7 +68,7 @@
 static void
 _PyObject_ArenaVirtualFree(void *ctx, void *ptr, size_t size)
 {
-    VirtualFree(ptr, size, MEM_RELEASE);
+    VirtualFree(ptr, 0, MEM_RELEASE);
 }
 
 #elif defined(ARENAS_USE_MMAP)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list