On Fri, Mar 7, 2008 at 5:48 PM, Andreas Rossberg <[EMAIL PROTECTED]> wrote: [...] > Yes, but note that approaches like these only work when you can > afford to patch the library (or its build process) appropriately. It > does not work in cases like the Gtk binding, where we just > dynamically link against the DLLs from the standard distribution > (because we do not want to build all that ourselves, esp. on Windows).
Yes, that's basically true. A replacement (global) new/delete can only directly track memory allocated through it. A workaround might be to just query process memory usage from the OS. > Also, some libraries already replace allocation themselves, so that > it is not that easy to redirect. I believe that Gecode falls into > that category (Guido will correct me if I'm wrong). That would be evil. The rule of thumb is that only the "module" that implements main should ever replace (the global) new/delete. -Vesa Karvonen _______________________________________________ alice-users mailing list [email protected] http://www.ps.uni-sb.de/mailman/listinfo/alice-users
