[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Does malloc() have to zero the block?
- From: Klaus Ripke <paul-lua@...>
- Date: Wed, 19 Sep 2007 21:39:21 +0200
On Wed, Sep 19, 2007 at 08:17:42PM +0100, Tony Finch wrote:
> Lua's expected realloc() semantics are very slightly more restricted than
> what POSIX allows. See http://www.lua.org/manual/5.1/manual.html#3.7
that's Lua's expected lua_Alloc semantics.
The standard l_alloc as of lauxlib.c calls free whenever size is 0,
posixly correct avoiding any assumptions on realloc(NULL, 0) behaviour.