[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Does malloc() have to zero the block?
- From: Tony Finch <dot@...>
- Date: Wed, 19 Sep 2007 20:17:42 +0100
On Wed, 19 Sep 2007, Ralph Hempel wrote:
>
> What are Lua's expected semantics of:
>
> 1. realloc() an existing block to a size of 0 bytes?
> 2. realloc() a new block to a size of 0 bytes?
>
> Knowing how much the Lua designers like to stick to well-known
> principles, I guess I did not need to ask either question :-)
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
Tony.
--
f.a.n.finch <dot@dotat.at> http://dotat.at/
IRISH SEA: SOUTHERLY, BACKING NORTHEASTERLY FOR A TIME, 3 OR 4. SLIGHT OR
MODERATE. SHOWERS. MODERATE OR GOOD, OCCASIONALLY POOR.