Changeset 518

Show
Ignore:
Timestamp:
01/18/11 02:04:30 (1 year ago)
Author:
braddr
Message:

merge in some 64 bit fixes from the d1 gc

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/gc/gcx.d

    r517 r518  
    22122212            if (p >= minAddr && p < maxAddr) 
    22132213            { 
    2214                 if ((cast(size_t)p & ~(PAGESIZE-1)) == pcache) 
     2214                if ((cast(size_t)p & ~cast(size_t)(PAGESIZE-1)) == pcache) 
    22152215                    continue; 
    22162216 
     
    22362236                        //debug(PRINTF) printf("\t\tbiti = x%x\n", biti); 
    22372237 
    2238                         pcache = cast(size_t)p & ~(PAGESIZE-1); 
     2238                        pcache = cast(size_t)p & ~cast(size_t)(PAGESIZE-1); 
    22392239                    } 
    22402240                    else if (bin == B_PAGEPLUS) 
     
    22452245                        biti = pn * (PAGESIZE / 16); 
    22462246 
    2247                         pcache = cast(size_t)p & ~(PAGESIZE-1); 
     2247                        pcache = cast(size_t)p & ~cast(size_t)(PAGESIZE-1); 
    22482248                    } 
    22492249                    else 
     
    24532453                auto bbase = pool.scan.base(); 
    24542454                auto btop = bbase + pool.scan.nwords; 
     2455                //printf("\t\tn = %d, bbase = %p, btop = %p\n", n, bbase, btop); 
    24552456                for (auto b = bbase; b < btop;) 
    24562457                { 
     
    24622463                    *b = 0; 
    24632464 
    2464                     auto o = pool.baseAddr + (b - bbase) * 32 * 16; 
     2465                    auto o = pool.baseAddr + (b - bbase) * (typeof(bitm).sizeof*8) * 16; 
    24652466                    if (!(bitm & 0xFFFF)) 
    24662467                    { 
     
    28132814        { 
    28142815            //debug(PRINTF) printf("+log_free(%p)\n", p); 
    2815             size_t i; 
    2816  
    2817             i = current.find(p); 
     2816            auto i = current.find(p); 
    28182817            if (i == OPFAIL) 
    28192818            { 
     
    28352834            for (size_t i = 0; i < current.dim; i++) 
    28362835            { 
    2837                 size_t j; 
    2838  
    2839                 j = prev.find(current.data[i].p); 
     2836                auto j = prev.find(current.data[i].p); 
    28402837                if (j == OPFAIL) 
    28412838                    current.data[i].print(); 
     
    28472844            for (size_t i = 0; i < current.dim; i++) 
    28482845            { 
    2849                 void *p; 
    2850                 size_t j; 
    2851  
    2852                 p = current.data[i].p; 
     2846                void* p = current.data[i].p; 
    28532847                if (!findPool(current.data[i].parent)) 
    28542848                { 
    2855                     j = prev.find(current.data[i].p); 
     2849                    auto j = prev.find(current.data[i].p); 
    28562850                    if (j == OPFAIL) 
    28572851                        debug(PRINTF) printf("N"); 
     
    28722866        { 
    28732867            //debug(PRINTF) printf("+log_parent()\n"); 
    2874             size_t i; 
    2875  
    2876             i = current.find(p); 
     2868            auto i = current.find(p); 
    28772869            if (i == OPFAIL) 
    28782870            {