lua-users home
lua-l archive

Re: Does malloc() have to zero the block?

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 2007年9月19日, Klaus Ripke wrote:
>
> read on http://www.opengroup.org/onlinepubs/007908775/xsh/malloc.html :
> "If the size of the space requested is 0, the behaviour is
> implementation-dependent; the value returned will be either a null
> pointer or a unique pointer."
Lua requires a NULL pointer in this situation, so it can't just use a
standard realloc().
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.

AltStyle によって変換されたページ (->オリジナル) /