[New-bugs-announce] [issue26474] Memory leak at malloc_closure.c

John Snow report at bugs.python.org
Wed Mar 2 16:59:56 EST 2016

New submission from John Snow:

malloc_closere.c holds a static list of items: free_list.
The items are being allocated in the more_core method using VirtualAlloc / mmap. However they never get released.

Here is the allocation code:

#ifdef MS_WIN32
    item = (ITEM *)VirtualAlloc(NULL,
                                           count * sizeof(ITEM),
    if (item == NULL)
    item = (ITEM *)mmap(NULL,
                        count * sizeof(ITEM),
                        PROT_READ | PROT_WRITE | PROT_EXEC,
                        MAP_PRIVATE | MAP_ANONYMOUS,
    if (item == (void *)MAP_FAILED)

components: ctypes
messages: 261138
nosy: John_Snow
priority: normal
severity: normal
status: open
title: Memory leak at malloc_closure.c
type: resource usage
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list