phobos 0.165

This commit is contained in:
Brad Roberts 2007-09-10 05:27:18 +00:00
parent c57830cc09
commit dbc7ec7b92
2 changed files with 8 additions and 1 deletions

View file

@ -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;

View file

@ -111,6 +111,7 @@ NAVIGATION_PHOBOS=
<h2><a href="phobos.html#std" title="D standard modules">std</a></h2>
$(UL
$(LI <a href="std_base64.html" title="Encode/decode base64 format">std.base64</a>)
$(LI <a href="std_bitarray.html" title="Arrays of bits">std.bitarray</a>)
$(LI <a href="std_boxer.html" title="Box/unbox types">std.boxer</a>)
$(LI <a href="std_compiler.html" title="Information about the D compiler implementation">std.compiler</a>)
$(LI <a href="std_conv.html" title="Conversion of strings to integers">std.conv</a>)