Subj : Re: JS_ARENAMETER To : netscape.public.mozilla.jseng From : "Stephen Jones" Date : Tue Aug 19 2003 10:23 am OK, now I understand that the nbytes member of the arena stats structure is always incremented, never decremented, so it would always grow, but I still don't really understand how the "arenas" are used. 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. I'm still hemoragging memory somewhere in SpiderMonkey, but not as bad as before. Does anyone have any suggestions on where to look? - S "Stephen Jones" wrote in message news:bhjpdq$kr73@ripley.netscape.com... > Our application that uses SpiderMonkey has been using copious amounts of > memory and in investigating where that memory was going, I ran across > JS_ARENAMETER. It appears that the "arenas" are where all the memory is > going, but I don't neccesarily understand what an "arena" is and why it's > taking so much memory. > > I tried to dump out the arenas in a method similar to JS_DumpArenaStats, but > there were hundreds of arenas, all with similar names, so I ended up > concatenating the statistic values for each similarly named arena. Someone > please tell me if this is not a valid approach. > > The concatenated "temp" arena seems to hang around 9MB and the "properties", > "note", and "code" arenas seem to be inconsequential, but the "gc-arena" is > out of control . . . after about 5 minutes it hits 21 MB and keeps climbing > and the "stack" arena hits 5MB and keeps climbing. > > Looking at the GC Stats, the "currently allocated bytes" climbs to 8MB, then > drops to about 100k after a GC and the hash meter stats seem reasonable. > > What are these different arenas? Why would they continually grow, even after > a GC? How can I keep the size of these items to a minimum? What am I doing > wrong? > > Thanks, > - Stephen Jones > > > > .