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 <rep...@bugs.python.org>
<http://bugs.python.org/issue22336>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to