在 2024-12-04 04:17, Pali Rohár 写道:
It allowed me to compile application in debug mode with msvcrtd.dll memory leak detector and then run it. It was compiled in the same way via gcc and msvc.I do not know a better way how to define those functions without locally undefining macros. Is there some gcc/clang extension which can do it in more cleaner way?
#define malloc(s) _malloc_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__)
/* Put the name in parentheses so it does not invoke the function-like
* macro. It's standard behavior; not an extension whatsoever. */
void* __cdecl (malloc) (size_t _Size);
--
Best regards,
LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
