A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-April/022400.html below:

[Python-Dev] Problem with the memory docs

[Python-Dev] Problem with the memory docs [Python-Dev] Problem with the memory docsMartin v. Loewis martin@v.loewis.de
05 Apr 2002 20:18:35 +0200
Tim Peters <tim.one@comcast.net> writes:

> [Martin]
> > I think I'm now getting to the root of your confusion. Calling
> > malloc(1) is *not* what Guido wants. Instead, he wants that
> > py_malloc(0) returns a non-null pointer "normally".
> 
> And there's no better way to be 100% clear about what that means than to
> specify a trivial implementation that satisfies it.

There could be, but perhaps there isn't. Such an implementation is an
overspecification: If a platform already guarantees that malloc(0)
acts as if it was passed a non-zero argument, there is no need to pass
1; passing 1 may have undesirable side effects.

Regards,
Martin




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4