I'm not that advanced in C++ so I hope it's an adequate question.
My situation is that I have a large legacy C code-base system and a small C++ application which I want to integrate it with.
One of the requirements is that this legacy system has its own memory allocation/deallocation methods and they must be used. In other words, since using C++ with, for example, std libraries typically calls delete()
for memory deallocation, I am interested in replacing that with my legacy system's deallocation functionality which we can call tfree()
(and allocation done through talloc()
).
I believe that there must be some way I can inject my own deallocation method in place of delete()
for the entirety of the C++ application, but I don't know how or if it is at all possible. I would appreciate any help