pike.git / src / block_allocator.c

version» Context lines:

pike.git/src/block_allocator.c:67:    PIKE_MEMPOOL_ALLOC(a, p->h.first, l->block_size);    p->h.first->next = BA_ONE;    PIKE_MEMPOOL_FREE(a, p->h.first, l->block_size);   }      static struct ba_page * ba_alloc_page(struct block_allocator * a, int i) {    struct ba_layout l = ba_get_layout(a, i);    size_t n = l.offset + l.block_size + l.doffset;    struct ba_page * p;    if (l.alignment) { -  p = aligned_alloc(n, l.alignment); +  p = xalloc_aligned(n, l.alignment);    } else {   #ifdef DEBUG_MALLOC    /* In debug malloc mode, calling xalloc from the block alloc may result    * in a deadlock, since xalloc will call ba_alloc, which in turn may call xalloc.    */    p = system_malloc(n);    if (!p) {    fprintf(stderr, "Fatal: Out of memory.\n");    exit(17);    }