Are all of the "different" memory allocators in the project (CRT, NSPR, nsCRT, nsMemory) actually different?
There's no guarantee that they are the same.
Note that NSPR has two different allocators. (compare http://lxr.mozilla.org/seamonkey/source/nsprpub/lib/libc/src/strdup.c#62 and http://lxr.mozilla.org/seamonkey/source/nsprpub/pr/src/malloc/prmem.c#454)
Don't nsCRT and nsMemory both call NSPR for de/allocation? Thus as long as all CRT allocating functions are prohibited (strdup, malloc, etc), it shouldn't matter if we call NSPR directly, or use nsCRT or nsMemory?
CRT and NSPR are potentially different, see http://lxr.mozilla.org/seamonkey/source/nsprpub/pr/src/malloc/prmem.c#432
nsMemory also does some extra work on allocation failure, to try to free up some memory.
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom
