Subj : Re: GC-related bug in SpiderMonkey To : pavel.cenek From : Brendan Eich Date : Sat May 14 2005 04:48 pm pavel.cenek@gmail.com wrote: > Brendan, > > thank you for the lightning-fast answer! > > Regarding the JS_NewRuntime's maxbytes parameter - it makes sense to me > now, however, I find the documentation a little bit unclear in this > matter. It says: "maxbytes specifies the number of allocated bytes > after which garbage collection is run". > > We interpreted it as that it is a threshold after which GC is run > (which implied questions like how much memory is allocated for the GC > things, when GC will be called again if GC does not free enough memory > to get under the threshold, etc.) > > It would be helpful to mention in the JS_NewRuntime documentation that > this is the upper memory limit and that the GC is launched > automatically only if there is no more memory for GC-thing allocation > and that the application itself should call JS_GC or JS_MaybeGC > regularly. The docs definitely need to be fixed in many ways, and what you suggest is one such good fix. Unfortunately, I don't have time to edit the custom XML format used at http://lxr.mozilla.org/mozilla/source/js/docs/jsref.xml, which is turned via a perl script into the docs at http://www.mozilla.org/js/spidermonkey/apidoc/sparse-frameset.html. Fortunately, the DevMo project is running nicely now, at http://developer-test.mozilla.org/, using mediawiki technology. So if we could migrate the JS API docs into it, many people, including you if you're motivated, could whip these flakey old docs into shape. Cc'ing Deb Richardson, DevMo lead, to find out what the next steps are. /be > > Is it possible to update the documentation in this way? It would IMO > help SpiderMonkey integrators a lot. > > Pavel > .