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

Commit

Permalink
Fixed some tabs that made it into the PR while doing the rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
Orvid committed Jan 13, 2015
1 parent 8a60fab commit f0027c7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/gc/gc.d
Original file line number Diff line number Diff line change
Expand Up @@ -2075,14 +2075,14 @@ struct Gcx
}


void* alloc(size_t size, ref size_t alloc_size, uint bits) nothrow
void* alloc(size_t size, ref size_t alloc_size, uint bits) nothrow
{
immutable bin = findBin(size);
return bin < B_PAGE ? smallAlloc(bin, alloc_size, bits) :
bigAlloc(size, alloc_size, bits);
}

void* smallAlloc(Bins bin, ref size_t alloc_size, uint bits) nothrow
void* smallAlloc(Bins bin, ref size_t alloc_size, uint bits) nothrow
{
alloc_size = binsize[bin];

Expand Down Expand Up @@ -2131,7 +2131,7 @@ struct Gcx
* Allocate a chunk of memory that is larger than a page.
* Return null if out of memory.
*/
void* bigAlloc(size_t size, ref size_t alloc_size, uint bits, const TypeInfo ti = null) nothrow
void* bigAlloc(size_t size, ref size_t alloc_size, uint bits, const TypeInfo ti = null) nothrow
{
debug(PRINTF) printf("In bigAlloc. Size: %d\n", size);

Expand Down Expand Up @@ -2202,7 +2202,7 @@ struct Gcx
alloc_size = npages * PAGESIZE;
//debug(PRINTF) printf("\tp = %p\n", p);

if (bits) setBits(pool, pn * PAGESIZE >> pool.shiftBy, bits);
if (bits) setBits(pool, pn * PAGESIZE >> pool.shiftBy, bits);
return p;
}

Expand Down
20 changes: 10 additions & 10 deletions src/rt/lifetime.d
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ size_t structTypeInfoSize(const TypeInfo ti) pure nothrow @nogc
{
if (!callStructDtorsDuringGC)
return 0;
if (ti && typeid(ti) is typeid(TypeInfo_Struct)) // avoid a complete dynamic type cast
{
auto sti = cast(TypeInfo_Struct)cast(void*)ti;
Expand Down Expand Up @@ -1643,13 +1643,13 @@ body
// a chance that flags have changed since this was cached, we should fetch the most recent flags
info.attr = GC.getAttr(info.base) | BlkAttr.APPENDABLE;
}
info = GC.qalloc(newsize + __arrayPad(newsize, tinext), info.attr, ti);
info = GC.qalloc(newsize + __arrayPad(newsize, tinext), info.attr, ti);
}
else
{
info = GC.qalloc(newsize + __arrayPad(newsize, tinext), !(ti.next.flags & 1) ? (BlkAttr.NO_SCAN | BlkAttr.APPENDABLE) : BlkAttr.APPENDABLE, ti);
info = GC.qalloc(newsize + __arrayPad(newsize, tinext), !(ti.next.flags & 1) ? (BlkAttr.NO_SCAN | BlkAttr.APPENDABLE) : BlkAttr.APPENDABLE, ti);
}
__setArrayAllocLength(info, newsize, isshared, tinext);
__setArrayAllocLength(info, newsize, isshared, tinext);
if(!isshared)
__insertBlkInfoCache(info, bic);
newdata = cast(byte *)__arrayStart(info);
Expand Down Expand Up @@ -1827,13 +1827,13 @@ body
// a chance that flags have changed since this was cached, we should fetch the most recent flags
info.attr = GC.getAttr(info.base) | BlkAttr.APPENDABLE;
}
info = GC.qalloc(newsize + __arrayPad(newsize, tinext), info.attr, ti);
info = GC.qalloc(newsize + __arrayPad(newsize, tinext), info.attr, ti);
}
else
{
info = GC.qalloc(newsize + __arrayPad(newsize, tinext), !(ti.next.flags & 1) ? (BlkAttr.NO_SCAN | BlkAttr.APPENDABLE) : BlkAttr.APPENDABLE, ti);
info = GC.qalloc(newsize + __arrayPad(newsize, tinext), !(ti.next.flags & 1) ? (BlkAttr.NO_SCAN | BlkAttr.APPENDABLE) : BlkAttr.APPENDABLE, ti);
}
__setArrayAllocLength(info, newsize, isshared, tinext);
__setArrayAllocLength(info, newsize, isshared, tinext);
if(!isshared)
__insertBlkInfoCache(info, bic);
newdata = cast(byte *)__arrayStart(info);
Expand Down Expand Up @@ -2113,13 +2113,13 @@ byte[] _d_arrayappendcTX(const TypeInfo ti, ref byte[] px, size_t n)
// a chance that flags have changed since this was cached, we should fetch the most recent flags
info.attr = GC.getAttr(info.base) | BlkAttr.APPENDABLE;
}
info = GC.qalloc(newcap + __arrayPad(newcap, tinext), info.attr, ti);
info = GC.qalloc(newcap + __arrayPad(newcap, tinext), info.attr, ti);
}
else
{
info = GC.qalloc(newcap + __arrayPad(newcap, tinext), !(ti.next.flags & 1) ? (BlkAttr.NO_SCAN | BlkAttr.APPENDABLE) : BlkAttr.APPENDABLE, ti);
info = GC.qalloc(newcap + __arrayPad(newcap, tinext), !(ti.next.flags & 1) ? (BlkAttr.NO_SCAN | BlkAttr.APPENDABLE) : BlkAttr.APPENDABLE, ti);
}
__setArrayAllocLength(info, newsize, isshared, tinext);
__setArrayAllocLength(info, newsize, isshared, tinext);
if(!isshared)
__insertBlkInfoCache(info, bic);
auto newdata = cast(byte *)__arrayStart(info);
Expand Down

0 comments on commit f0027c7

Please sign in to comment.