summaryrefslogtreecommitdiff
path: root/library/Hooks-linux.cpp
diff options
context:
space:
mode:
authorPetr Mrázek2012-04-01 00:30:42 +0200
committerPetr Mrázek2012-04-01 00:30:42 +0200
commit209b26128464537be2474b78da7b3409fa4f4d92 (patch)
tree09a8bc0652bd85e426a0050149ec6b3a5098c8dc /library/Hooks-linux.cpp
parent4bac6edd79e82d8c1e5f9c1eca6cd8d34f712290 (diff)
downloaddfhack-209b26128464537be2474b78da7b3409fa4f4d92.tar.gz
dfhack-209b26128464537be2474b78da7b3409fa4f4d92.tar.bz2
dfhack-209b26128464537be2474b78da7b3409fa4f4d92.tar.xz
Get rid of MALLOC_FILL build option
Diffstat (limited to 'library/Hooks-linux.cpp')
-rw-r--r--library/Hooks-linux.cpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/library/Hooks-linux.cpp b/library/Hooks-linux.cpp
index aeb719b8..3628aab6 100644
--- a/library/Hooks-linux.cpp
+++ b/library/Hooks-linux.cpp
@@ -141,24 +141,3 @@ DFhackCExport int SDL_Init(uint32_t flags)
int ret = _SDL_Init(flags);
return ret;
}
-
-#ifdef MALLOC_FILL
-DFhackCExport void * malloc(size_t size)
-{
- static void* (*real_malloc)(size_t) = NULL;
- if (!real_malloc)
- real_malloc = (void * (*)( size_t )) dlsym(RTLD_NEXT, "malloc");
- // check if we got them
- if(!real_malloc)
- {
- // bail, this would be a disaster otherwise
- exit(1);
- }
- void * ret = real_malloc(size);
- if(ret)
- {
- memset(ret, 0xCC, size);
- }
- return ret;
-}
-#endif