overruling new/delete, malloc/free
-
Because I want to plug-in my own specific memory/heap manager, I need to overrule the global new and delete operators, and the global malloc and free functions. What is the best way to do this? Simply overrule these 2 operators and 2 functions or do I need to overrule other functions as well? Is there a good explanation or documentation in the MSDN somewhere on how to do this? Apparently, the standard C run time library only allows some additional checking hooks, but I want to plug in my own complete memory/heap manager, not only perform some additiona checks. Also these additional checks only work in a debug version, not in a production version. If I need to overrule more functions, how can I be guaranteed that this isn't depending on the version of the compiler (Visual Studio .Net, 7.1 in my case)? Thanks. Enjoy life, this is not a rehearsal !!!
-
Because I want to plug-in my own specific memory/heap manager, I need to overrule the global new and delete operators, and the global malloc and free functions. What is the best way to do this? Simply overrule these 2 operators and 2 functions or do I need to overrule other functions as well? Is there a good explanation or documentation in the MSDN somewhere on how to do this? Apparently, the standard C run time library only allows some additional checking hooks, but I want to plug in my own complete memory/heap manager, not only perform some additiona checks. Also these additional checks only work in a debug version, not in a production version. If I need to overrule more functions, how can I be guaranteed that this isn't depending on the version of the compiler (Visual Studio .Net, 7.1 in my case)? Thanks. Enjoy life, this is not a rehearsal !!!
you could try to overwrite it... i coded a c++ framework for kernel mode(i didn't have to overwrite the new/delete operator, cause there is none) and it works fine, also with different compiler versions. Don't try it, just do it! ;-)