Brian Lu wrote: > We can't provide the nspr_use_zone_allocator() either. The routine is > used for server applications.
A little googling reveals: nspr_use_zone_allocator is indeed a global variable that you can define in a dll/main program. If it is defined and has the value PR_TRUE, NSPR will use the zone allocator, i.e., the stuff in http://lxr.mozilla.org/seamonkey/source/nsprpub/pr/src/malloc/prmem.c#195. On the other hand, if it is not defined or has the value PR_FALSE, NSPR will simply use the regular malloc, calloc, and free in libc. Today, it seems the firefox "main" does not provide this symbol. Nor do any of the dependencies of firefox. However, ld.so.1 goes through an exhaustive search trying to find the symbol. If firefox "main" defined: nspr_use_zone_allocator = PR_FALSE; then the exhaustive search would be unnecessary. Both the lack of a symbol definition, or a PR_FALSE false definition result in the same thing - NSPR will use the regular malloc, calloc, etc. I still don't understand why you don't add a definition to firefox. > Can runtime linker provide some feature like "don't resolve this symbol > even it is looked up by dlsym()"? Possibly. We'd have to thrash out the model. But are you looking for something like: dlantisym("nspr_use_zone_allocator"); or some other registration scheme? If so, you're going to have to wait for the implementation and modify your code to make said registration. Wouldn't it be simpler to add the definition? I must be missing something. -- Rod.