]> granicus.if.org Git - python/commitdiff
Issue #3329: Fix _PyObject_ArenaVirtualFree()
authorVictor Stinner <victor.stinner@gmail.com>
Sun, 7 Jul 2013 01:06:16 +0000 (03:06 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Sun, 7 Jul 2013 01:06:16 +0000 (03:06 +0200)
According to VirtualFree() documentation, the size must be zero if the "free
type" is MEM_RELEASE.

Objects/obmalloc.c

index d08515d776633a92e444b61975870d00362f1ce6..97a137db37300435fa376d58caef369ddcb35d0f 100644 (file)
@@ -68,7 +68,7 @@ _PyObject_ArenaVirtualAlloc(void *ctx, size_t size)
 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)