Changeset ed1a4b7 in git


Ignore:
Timestamp:
2012-07-19T04:05:56Z (7 years ago)
Author:
Xuefer <xuefer@…>
Branches:
3.0, 3.1, 3.2, master, trunk
Children:
5cd9012
Parents:
4e78a9d
Message:

fix mem test

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • xcache/xc_mem.c

    r4e78a9d red1a4b7  
    339339    void *p;
    340340    void *memory;
     341    xc_mem_t *mem;
    341342    void **ptrs;
    342     xc_mem_t mem_holder, *mem = &mem_holder;
    343343    int size, i;
    344344
     
    347347    scanf("%d", &size);
    348348#else
    349     size = 100;
     349    size = 1024;
    350350#endif
    351351    CHECK(memory = malloc(size), "OOM");
    352352    CHECK(ptrs   = malloc(size * sizeof(void *)), "OOM");
    353     CHECK(mem    = xc_mem_init(memory, mem, size), "Failed init memory allocator");
     353    mem = (xc_mem_t *) memory;
     354    CHECK(mem    = xc_mem_init(NULL, mem, size), "Failed init memory allocator");
    354355
    355356    while ((p = xc_mem_malloc(mem, 1))) {
    356         fprintf(stderr, "%d %p\n", count, ptrs);
    357357        ptrs[count ++] = p;
    358358    }
Note: See TracChangeset for help on using the changeset viewer.