lua-users home
lua-l archive

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


> The new allocator in specific circumstances decides to deny its operations, allocations and free
> (also free because it checks for possible corruptions of the memory pointers).

lua_Alloc should behave externally like realloc. In particular, the
allocator should return NULL when it cannot fulfill an allocation
request.

On the other hand, the manual says: "When nsize is zero, the allocator
must behave like free and return NULL.". So you cannot signal errors
in free by returning NULL. I think you cannot signal erros in free at
all. The allocator cannot set L->status because it does not receive L.
Moreover, the code in lmem.c never checks L->status.
_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org