Changeset 676


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

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

Location:
branches/1.3
Files:
4 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; 
  • branches/1.3/mem.h

    r394 r676  
     1#include "xc_shm.h" 
     2 
    13typedef struct _xc_mem_handlers_t xc_mem_handlers_t; 
    24 
     
    1416typedef struct XC_MEM_IMPL xc_mem_t; 
    1517typedef struct XC_MEMBLOCK_IMPL xc_block_t; 
    16 typedef unsigned int xc_memsize_t; 
     18typedef xc_shmsize_t xc_memsize_t; 
    1719 
    1820/* shm::mem */ 
  • branches/1.3/xcache.c

    r674 r676  
    28402840    } 
    28412841 
    2842     *p = zend_atoi(value, strlen(value)); 
     2842    *p = zend_atol(value, strlen(value)); 
    28432843    return SUCCESS; 
    28442844} 
Note: See TracChangeset for help on using the changeset viewer.