Topic: Overloading new and delete using Borland C++ 3.1
Author: sdw@ioc.co.uk (Simon Whiteside)
Date: Thu, 24 Feb 1994 15:25:27 GMT Raw View
Hi everyone!
I'm asking this question on the net because Borland Technical Support couldn't answer
it!
We're using a number of 3rd-party libraries, some statically linked, some in DLL's.
The ones in DLL's require us to use the C-runtime as a DLL.
Up to now we used to statically link everything, but we've run out of everything
(you know - stuff like data segment, symbol tables etc..), so we're trying to use
DLL's.
ALSO we want to continue to overload the global new and delete operators - both for
stats and clever memory optimizations (like small block allocation).
However when we're using DLL's they're all individually calling the new and delete
defined in BC30RTL.DLL, the C-runtime library.
How do we globally override the new and delete in this case?
Currently I'm rebuilding BC30RTL.DLL with our version of new and delete, but this seems
excessively hacky.
Has anyone else faced, and maybe solved, this problem?
Many thanks.
Simon.
--
------------------------------------------------------------------------------
Simon Whiteside| IOC Ltd, Bechtel House, 245 Hammersmith Road, London W6 8DP,
sdw@ioc.co.uk | England. Voice: +44 (0)81 528 9864 Fax: +44 (0)81 528 9878