[Python-bugs-list] [ python-Bugs-542181 ] Realloc behavior
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 10 Apr 2002 14:18:50 -0700
Bugs item #542181, was opened at 2002-04-10 21:18
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=542181&group_id=5470
Category: Python Interpreter Core
Group: Not a Bug
Status: Open
Resolution: None
Priority: 5
Submitted By: Gustavo Niemeyer (niemeyer)
Assigned to: Nobody/Anonymous (nobody)
Summary: Realloc behavior
Initial Comment:
I was just looking in obmalloc.c, and found this code
and comment:
else if (narenas == maxarenas) {
/* Grow arenas. Don't use realloc: if this
* fails, we don't want to lose the base
* addresses we already have.
[...]
Realloc may be safely used here. Realloc's behavior
on failure is usually misunderstood. It will return
NULL, but *won't* touch the already allocated memory.
I know there are other constraints in this piece of
code, but at least this comment may be safely
removed.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=542181&group_id=5470