Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Removed isOOM
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne Cimon committed Jun 5, 2014
1 parent 4baa4ef commit 548f3e2
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/gc/gc.d
Original file line number Diff line number Diff line change
Expand Up @@ -2165,7 +2165,7 @@ struct Gcx
* Sort it into pooltable[].
* Return null if failed.
*/
Pool *newPool(size_t npages, bool isLargeObject, bool isOOM = false) nothrow
Pool *newPool(size_t npages, bool isLargeObject) nothrow
{
Pool* pool;
Pool** newpooltable;
Expand All @@ -2185,14 +2185,11 @@ struct Gcx
}

// Allocate successively larger pools up to 8 megs
if (!isOOM && npools)
if (npools)
{ size_t n;

n = npools;
if (n > 32)
n *= n;
else if (n > 8)
n = 16;
n = npools * 3;

n *= (POOLSIZE / PAGESIZE);
if (npages < n)
npages = n;
Expand Down Expand Up @@ -2232,8 +2229,6 @@ struct Gcx
Lerr:
pool.Dtor();
cstdlib.free(pool);
if (!isOOM)
return newPool(npages, isLargeObject, true);
return null;
}

Expand Down

0 comments on commit 548f3e2

Please sign in to comment.