Changeset ebae2a7 in git


Ignore:
Timestamp:
2009-08-26T03:00:52Z (11 years ago)
Author:
Xuefer <xuefer@…>
Branches:
3.0, 3.1, 3.2, master, trunk
Children:
15d74ba
Parents:
e528634
Message:

improved fixe for #224: 2G/4G limitation on 64bit arch

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@675 c26eb9a1-5813-0410-bd6c-c2e55f420ca7

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mem.c

    r2a1d287 rebae2a7  
    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;
  • mem.h

    r5dd9e24 rebae2a7  
     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 */
Note: See TracChangeset for help on using the changeset viewer.