[New-bugs-announce] [issue22336] _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()
STINNER Victor
report at bugs.python.org
Thu Sep 4 17:46:10 CEST 2014
New submission from STINNER Victor:
The PyMem_Malloc(size) function has a well defined behaviour: if size is 0, a pointer different than NULL is returned. It looks like ckalloc(size) returns NULL if the size is NULL: see issue #21951 (bug on AIX).
Moreover, memory allocated by ckalloc() is not traced by the new tracemalloc module!
Attached patch replaces calls to ckalloc() and ckfree() with PyMem_Malloc() and PyMem_Free(). It may fix the issue #21951 on AIX.
There is still a call to ckfree() in Tkapp_SplitList(). This memory block is allocated internally by Tcl, not directly by _tkinter.c.
----------
files: pymem.patch
keywords: patch
messages: 226363
nosy: David.Edelsohn, haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: _tkinter should use Python PyMem_Malloc() instead of Tcl ckalloc()
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file36533/pymem.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22336>
_______________________________________
More information about the New-bugs-announce
mailing list