ecere-sdk
ecere-sdk copied to clipboard
Changes to allow debug memory problems
usage: make V=1 DEBUG=1 DBGWRAPPER=valgrind DISABLE_MEMMGR=1 DESTDIR=$HOME/local
Hi @mingodad, wondering if you had a chance to figure out what issue that you ran into was?
As I had mentioned, I think it likely had to do with a memory management mix-up.
In your PR, I see usage of malloc_usable_size() but that will not work properly as that does not return the size that was requested.
(I have made that mistake before).
We cannot merge these changes to use regular malloc/calloc/realloc when _DEBUG is defined because of this, and also because the code should go through the regular pathways which supports our own MemoryGuard memory checker and the eC which makes a huge performance difference for small allocation on Windows platforms.
Please let me know if I can be of further help.