lua-users home
lua-l archive

Re: Lua alloc function with just malloc and free causes crash

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


> The Lua documentation states that Lua assumes that the allocator never
> fails when osize >= nsize. Does Lua also assume that the following
> expression always evaluates to true when osize >= nsize?
> 
> ptr == my_alloc(void *ud, void *ptr, size_t osize, size_t nsize)
> 
No. You can move the block when shrinking it.
-- Roberto

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