mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-09 04:25:38 +00:00
Bug 592907 - TM: set JSGC_MAX_BYTES to a sane value (r=igor)
This commit is contained in:
parent
379f9466a6
commit
d1df5e15ea
@ -3882,12 +3882,12 @@ SetMemoryHighWaterMarkPrefChangedCallback(const char* aPrefName, void* aClosure)
|
||||
* to use jsmalloc() and the other is to use GC-owned memory
|
||||
* (e.g. js_NewGCThing()).
|
||||
*
|
||||
* In the browser, we don't cap the amount of GC-owned memory.
|
||||
* In the browser, we limit the amount of GC-owned memory to 512MB.
|
||||
*/
|
||||
JS_SetGCParameter(nsJSRuntime::sRuntime, JSGC_MAX_MALLOC_BYTES,
|
||||
64L * 1024L * 1024L);
|
||||
JS_SetGCParameter(nsJSRuntime::sRuntime, JSGC_MAX_BYTES,
|
||||
0xffffffff);
|
||||
512L * 1024L * 1024L);
|
||||
} else {
|
||||
JS_SetGCParameter(nsJSRuntime::sRuntime, JSGC_MAX_MALLOC_BYTES,
|
||||
highwatermark * 1024L * 1024L);
|
||||
|
@ -2813,6 +2813,7 @@ MarkAndSweep(JSContext *cx GCTIMER_PARAM)
|
||||
/*
|
||||
* Mark phase.
|
||||
*/
|
||||
TIMESTAMP(startMark);
|
||||
GCMarker gcmarker(cx);
|
||||
JS_ASSERT(IS_GC_MARKING_TRACER(&gcmarker));
|
||||
JS_ASSERT(gcmarker.getMarkColor() == BLACK);
|
||||
@ -3174,7 +3175,6 @@ GCUntilDone(JSContext *cx, JSGCInvocationKind gckind GCTIMER_PARAM)
|
||||
AutoUnlockGC unlock(rt);
|
||||
if (firstRun) {
|
||||
PreGCCleanup(cx, gckind);
|
||||
TIMESTAMP(startMark);
|
||||
firstRun = false;
|
||||
}
|
||||
MarkAndSweep(cx GCTIMER_ARG);
|
||||
|
@ -5333,7 +5333,7 @@ main(int argc, char **argv, char **envp)
|
||||
CALIBRATION_DELAY_COUNT = 0;
|
||||
#endif
|
||||
|
||||
rt = JS_NewRuntime(128L * 1024L * 1024L);
|
||||
rt = JS_NewRuntime(64L * 1024L * 1024L);
|
||||
if (!rt)
|
||||
return 1;
|
||||
|
||||
@ -5345,6 +5345,7 @@ main(int argc, char **argv, char **envp)
|
||||
return 1;
|
||||
|
||||
JS_SetGCParameterForThread(cx, JSGC_MAX_CODE_CACHE_BYTES, 16 * 1024 * 1024);
|
||||
JS_SetGCParameter(rt, JSGC_MAX_BYTES, 512L * 1024L * 1024L);
|
||||
|
||||
result = shell(cx, argc, argv, envp);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user