Changeset 676 in svn for branches/1.3/mem.c


Ignore:
Timestamp:
2009-08-26T05:02:07+02:00 (6 years ago)
Author:
Xuefer
Message:

fixed #224: 2G/4G limitation on 64bit arch

Location:
branches/1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

  • branches/1.3/mem.c

    r625 r676  
    9191    realsize = ALIGN(realsize);
    9292
    93     TRACE("avail: %d (%dKB). Allocate size: %d realsize: %d (%dKB)"
     93    TRACE("avail: %lu (%luKB). Allocate size: %lu realsize: %lu (%luKB)"
    9494            , mem->avail, mem->avail / 1024
    9595            , size
     
    104104
    105105        b = NULL;
    106         minsize = INT_MAX;
     106        minsize = ULONG_MAX;
    107107
    108108        /* prev|cur */
     
    161161         */
    162162
    163         TRACE(" -> avail: %d (%dKB). new next: %p offset: %d %dKB. Got: %p"
     163        TRACE(" -> avail: %lu (%luKB). new next: %p offset: %lu %luKB. Got: %p"
    164164                , mem->avail, mem->avail / 1024
    165165                , newb
     
    183183
    184184    cur = (xc_block_t *) (CHAR_PTR(p) - BLOCK_HEADER_SIZE());
    185     TRACE("freeing: %p, size=%d", p, cur->size);
     185    TRACE("freeing: %p, size=%lu", p, cur->size);
    186186    xc_block_check(cur);
    187187    assert((char*)mem < (char*)cur && (char*)cur < (char*)mem + mem->size);
     
    198198    size = cur->size;
    199199
    200     TRACE(" avail %d (%dKB)", mem->avail, mem->avail / 1024);
     200    TRACE(" avail %lu (%luKB)", mem->avail, mem->avail / 1024);
    201201    mem->avail += size;
    202202
     
    216216        TRACE("%s", " combine next");
    217217    }
    218     TRACE(" -> avail %d (%dKB)", mem->avail, mem->avail / 1024);
     218    TRACE(" -> avail %lu (%luKB)", mem->avail, mem->avail / 1024);
    219219    return size;
    220220}
     
    297297        return NULL;
    298298    }
     299    TRACE("size=%lu", size);
    299300    mem->shm = shm;
    300301    mem->size = size;
Note: See TracChangeset for help on using the changeset viewer.