undo commit 050846ada9 - lua memory allocator
Commit 050846ada9 checked for
re_alloc(NULL,n) and returned alloc(n) for that case. After testing
MONITOR_HEAP and heaputil, the original code worked as intended.
I'm not sure what was going wrong yesterday.
Switch back to the previous code. I could have used 'git revert'
but haven't.
This commit is contained in:
@@ -2875,9 +2875,6 @@ nhl_alloc(void *ud, void *ptr, size_t osize UNUSED, size_t nsize)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* realloc(NULL, size) is legitimate but confuses MONITOR_HEAP */
|
||||
if (!ptr)
|
||||
return alloc((unsigned) nsize);
|
||||
return re_alloc(ptr, (unsigned) nsize);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user