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

Commit

Permalink
Merge pull request #1114 from rainers/fix_array_extend
Browse files Browse the repository at this point in the history
fix GC.extend calls in rt.lifetime
  • Loading branch information
MartinNowak committed Jan 22, 2015
2 parents 083fc12 + 59838cb commit 36b430d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rt/lifetime.d
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ Lcontinue:
if(info.size >= PAGESIZE && curcapacity != 0)
{
auto extendsize = reqsize + offset + LARGEPAD - info.size;
auto u = GC.extend((*p).ptr, extendsize, extendsize);
auto u = GC.extend(info.base, extendsize, extendsize);
if(u)
{
// extend worked, save the new current allocated size
Expand Down Expand Up @@ -1587,7 +1587,7 @@ body
{
// not enough space, try extending
auto extendsize = newsize + offset + LARGEPAD - info.size;
auto u = GC.extend((*p).ptr, extendsize, extendsize);
auto u = GC.extend(info.base, extendsize, extendsize);
if(u)
{
// extend worked, now try setting the length
Expand Down Expand Up @@ -1770,7 +1770,7 @@ body
{
// not enough space, try extending
auto extendsize = newsize + offset + LARGEPAD - info.size;
auto u = GC.extend((*p).ptr, extendsize, extendsize);
auto u = GC.extend(info.base, extendsize, extendsize);
if(u)
{
// extend worked, now try setting the length
Expand Down Expand Up @@ -2011,7 +2011,7 @@ byte[] _d_arrayappendcTX(const TypeInfo ti, ref byte[] px, size_t n)
{
// not enough space, try extending
auto extendoffset = offset + LARGEPAD - info.size;
auto u = GC.extend(px.ptr, newsize + extendoffset, newcap + extendoffset);
auto u = GC.extend(info.base, newsize + extendoffset, newcap + extendoffset);
if(u)
{
// extend worked, now try setting the length
Expand Down

0 comments on commit 36b430d

Please sign in to comment.