lua-users home
lua-l archive

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


Hello everyone,

I am using lua 5.4 to run a larger project. I have my own realloc /
malloc / free implementation. Initially, I thought I would print a
warning when lua would make a realloc equivalent to free(NULL). I
thought this should never happen because it is useless to do this.
When running the code the warning was printed all the time. I was not
able to track down when exactly this happens. Does somebody know why
and when this occurs?
It does not really matter for the code in the end. I can I would
simply like to know this out of curiosity. These calls just seem
unnecessary to me. The lua documentation even says that free(NULL)
should has no effect, so why even call it?

Best regards,
Michael