From dbc7ec7b92ae644f1b836a86b6989623e715acdf Mon Sep 17 00:00:00 2001 From: Brad Roberts Date: Mon, 10 Sep 2007 05:27:18 +0000 Subject: [PATCH] phobos 0.165 --- internal/gc/gcx.d | 8 +++++++- std.ddoc | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/internal/gc/gcx.d b/internal/gc/gcx.d index f4769a279..311c8fc1b 100644 --- a/internal/gc/gcx.d +++ b/internal/gc/gcx.d @@ -40,6 +40,7 @@ import gcstats; version (Win32) { import win32; + import std.c.windows.windows; } version (linux) @@ -259,7 +260,7 @@ class GC p = gcx.bucket[bin]; if (p == null) { - if (!gcx.allocPage(bin)) // try to find a new page + if (!gcx.allocPage(bin) && !gcx.disabled) // try to find a new page { if (std.thread.Thread.nthreads == 1) { @@ -1143,6 +1144,10 @@ struct Gcx switch (state) { case 0: + if (disabled) + { state = 1; + continue; + } // Try collecting freedpages = fullcollectshell(); if (freedpages >= npools * ((POOLSIZE / PAGESIZE) / 4)) @@ -1370,6 +1375,7 @@ struct Gcx uint fullcollectshell() { + // The purpose of the 'shell' is to ensure all the registers // get put on the stack so they'll be scanned void *sp; diff --git a/std.ddoc b/std.ddoc index 238856543..0fed6920c 100644 --- a/std.ddoc +++ b/std.ddoc @@ -111,6 +111,7 @@ NAVIGATION_PHOBOS=

std

$(UL $(LI std.base64) + $(LI std.bitarray) $(LI std.boxer) $(LI std.compiler) $(LI std.conv)