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

Commit

Permalink
remove min/maxAddr properties from Gcx
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinNowak committed Jan 18, 2015
1 parent 93006b4 commit c9f7385
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/gc/gc.d
Original file line number Diff line number Diff line change
Expand Up @@ -1354,9 +1354,6 @@ struct Gcx
uint running;
int disabled; // turn off collections if >0

@property byte* minAddr() pure nothrow { return pooltable.minAddr; }
@property byte* maxAddr() pure nothrow { return pooltable.maxAddr; }

@property size_t npools() pure const nothrow { return pooltable.length; }
PoolTable!Pool pooltable;

Expand Down Expand Up @@ -1429,12 +1426,6 @@ struct Gcx
//printf("Gcx.invariant(): this = %p\n", &this);
pooltable.Invariant();

if (pooltable.length)
{
assert(minAddr == pooltable[0].baseAddr);
assert(maxAddr == pooltable[$ - 1].topAddr);
}

foreach (range; ranges)
{
assert(range.pbot);
Expand Down Expand Up @@ -2134,7 +2125,7 @@ struct Gcx
auto p = cast(byte *)(*p1);

//if (log) debug(PRINTF) printf("\tmark %p\n", p);
if (p >= minAddr && p < maxAddr)
if (p >= pooltable.minAddr && p < pooltable.maxAddr)
{
if ((cast(size_t)p & ~cast(size_t)(PAGESIZE-1)) == pcache)
continue;
Expand Down Expand Up @@ -3007,6 +2998,9 @@ nothrow:

foreach (i, pool; pools[0 .. npools - 1])
assert(pool.baseAddr < pools[i + 1].baseAddr);

assert(minAddr == pools[0].baseAddr);
assert(maxAddr == pools[npools - 1].topAddr);
}

private:
Expand Down

0 comments on commit c9f7385

Please sign in to comment.