Subj : Re: JS_ARENAMETER To : netscape.public.mozilla.jseng From : "Stephen Jones" Date : Fri Aug 22 2003 02:49 pm "Brendan Eich" wrote in message news:3F430D1C.4070604@meer.net... > Stephen Jones wrote: > > >I've uncovered what appears to be a consistent memnory leak in > >JS_GetStringBytes. I looked at the archives for this list and saw similar > >reports, but they weren't calling JS_ShutDown and I am. When I switched from > >JS_GetStringBytes to JS_GetStringChars, the leak went away. > > > > What version of the engine sources are you using? 1.5 rc4 > >I'm still hemoragging memory somewhere in SpiderMonkey, but not as bad as > >before. Does anyone have any suggestions on where to look? > > > > When do you run the GC? When you think you leak via JS_GetStringBytes, > do you see the GC collect the string associated via the > deflated_string_cache with the bytes? I see some strings get collected and I see some strings being deleted from deflated_string_cache, but not all. Like I said, when I replaced JS_GetStringBytes with JS_GetStringChar, the reported memory leaks went away. I'm only running GC when we run out of memory, but I have a debug terminal window setup that allows me to run GC manually at any time. This is what I'm using for testing purposes to make sure all memory is cleaned up. I'm trying the "GlowCode" product to help track down where all this memory is being allocated. - S .