Lines Matching refs:cur
333 chunk_t* cur = mList.head(); in alloc() local
336 while (cur) { in alloc()
339 extra = ( -cur->start & ((pagesize/kMemoryAlign)-1) ) ; in alloc()
342 if (cur->free && (cur->size >= (size+extra))) { in alloc()
343 if ((!free_chunk) || (cur->size < free_chunk->size)) { in alloc()
344 free_chunk = cur; in alloc()
346 if (cur->size == size) { in alloc()
350 cur = cur->next; in alloc()
386 chunk_t* cur = mList.head(); in dealloc() local
387 while (cur) { in dealloc()
388 if (cur->start == start) { in dealloc()
389 LOG_FATAL_IF(cur->free, in dealloc()
391 cur->start*kMemoryAlign, cur->size*kMemoryAlign); in dealloc()
394 chunk_t* freed = cur; in dealloc()
395 cur->free = 1; in dealloc()
397 chunk_t* const p = cur->prev; in dealloc()
398 chunk_t* const n = cur->next; in dealloc()
399 if (p && (p->free || !cur->size)) { in dealloc()
401 p->size += cur->size; in dealloc()
402 mList.remove(cur); in dealloc()
403 delete cur; in dealloc()
405 cur = n; in dealloc()
406 } while (cur && cur->free); in dealloc()
419 cur = cur->next; in dealloc()
449 chunk_t const* cur = mList.head(); in dump_l() local
458 while (cur) { in dump_l()
461 int np = ((cur->next) && cur->next->prev != cur) ? 1 : 0; in dump_l()
462 int pn = ((cur->prev) && cur->prev->next != cur) ? 2 : 0; in dump_l()
465 i, cur, int(cur->start*kMemoryAlign), in dump_l()
466 int(cur->size*kMemoryAlign), in dump_l()
467 int(cur->free) ? "F" : "A", in dump_l()
472 if (!cur->free) in dump_l()
473 size += cur->size*kMemoryAlign; in dump_l()
476 cur = cur->next; in dump_l()