Lea allocator - can somebody please help me ?
-
Hello, sorry for posting this here. The question is: how to replace malloc with the Lea's allocator malloc ? http://gee.cs.oswego.edu/dl/html/malloc.html I tried everything but it doesn't work. I even posted this question to the author of its malloc replacement, Lea Dough. But my question is more windows related so he cannot answer me. At the same time I know that somebody here has been able to do it. Here is the list of what I did and of what some related question. But really what matter is that somebody is telling me how to do it. I am building a program build on top of other dynamic libraries. Everything using STLport. I created another static library, or dynamic I made as very first line of code in the first #if defined(USE_LEA) && defined(_WIN32) #pragma comment(lib, "libLea.lib") #endif If I #include malloc.h then I have compilers problem ( probably because the library is using precompiled headers ) like: c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdlib.h(291): error C2375: 'malloc' : redefinition; different linkage If I do not #include malloc.h then it compiles but at the end it is not using the malloc of Lea. I would like not to use detour. I don't think is a good idea to replace malloc.c malloc.h in the Visual Studio .NET\Vc7\include directory Can somebody help me ? Thanks a lot. Cheers, Marcello