So I have another (yes I tried to find the answer but haven't yet):
how can I hook operator new()?

With malloc() we have __builtin_malloc which is a single global variable
available to all shared libraries. That's cool but there seems
no equivalent for operator new().

operator new() is a weak symbol in Elf isn't it? So it can be replaced
by a user function globally? (even in by a shared library?)

[Of course C++ Standard is quite stupid here. If you replace operator
new, how do you call the original?]

-- 
John Skaller <skaller at users dot sf dot net>
Try Felix, the successor to C++ http://felix.sf.net
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to