mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 21:23:06 +00:00
Add hooking functionality
This allows us to hook chosen functions and do interesting things there (in particular: reentrancy checking).
This commit is contained in:
committed by
David Goldblatt
parent
36bd90b962
commit
0a0fcd3e6a
@@ -149,6 +149,15 @@ _tls_callback(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* We need to be able to say "read" here (in the "pragma section"), but have
|
||||
* hooked "read". We won't read for the rest of the file, so we can get away
|
||||
* with unhooking.
|
||||
*/
|
||||
#ifdef read
|
||||
# undef read
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# ifdef _M_IX86
|
||||
# pragma comment(linker, "/INCLUDE:__tls_used")
|
||||
|
||||
Reference in New Issue
Block a user