Lines Matching refs:free_chunk
332 chunk_t* free_chunk = nullptr; in alloc() local
343 if ((!free_chunk) || (cur->size < free_chunk->size)) { in alloc()
344 free_chunk = cur; in alloc()
353 if (free_chunk) { in alloc()
354 const size_t free_size = free_chunk->size; in alloc()
355 free_chunk->free = 0; in alloc()
356 free_chunk->size = size; in alloc()
360 extra = ( -free_chunk->start & ((pagesize/kMemoryAlign)-1) ) ; in alloc()
362 chunk_t* split = new chunk_t(free_chunk->start, extra); in alloc()
363 free_chunk->start += extra; in alloc()
364 mList.insertBefore(free_chunk, split); in alloc()
368 ((free_chunk->start*kMemoryAlign)&(pagesize-1)), in alloc()
374 free_chunk->start + free_chunk->size, tail_free); in alloc()
375 mList.insertAfter(free_chunk, split); in alloc()
378 return (free_chunk->start)*kMemoryAlign; in alloc()