Lines Matching refs:usable_arenas
1192 static struct arena_object* usable_arenas = NULL; variable
1284 assert(usable_arenas == NULL); in new_arena()
1459 if (UNLIKELY(usable_arenas == NULL)) { in allocate_from_new_pool()
1466 usable_arenas = new_arena(); in allocate_from_new_pool()
1467 if (usable_arenas == NULL) { in allocate_from_new_pool()
1470 usable_arenas->nextarena = usable_arenas->prevarena = NULL; in allocate_from_new_pool()
1471 assert(nfp2lasta[usable_arenas->nfreepools] == NULL); in allocate_from_new_pool()
1472 nfp2lasta[usable_arenas->nfreepools] = usable_arenas; in allocate_from_new_pool()
1474 assert(usable_arenas->address != 0); in allocate_from_new_pool()
1481 assert(usable_arenas->nfreepools > 0); in allocate_from_new_pool()
1482 if (nfp2lasta[usable_arenas->nfreepools] == usable_arenas) { in allocate_from_new_pool()
1484 nfp2lasta[usable_arenas->nfreepools] = NULL; in allocate_from_new_pool()
1487 if (usable_arenas->nfreepools > 1) { in allocate_from_new_pool()
1488 assert(nfp2lasta[usable_arenas->nfreepools - 1] == NULL); in allocate_from_new_pool()
1489 nfp2lasta[usable_arenas->nfreepools - 1] = usable_arenas; in allocate_from_new_pool()
1493 poolp pool = usable_arenas->freepools; in allocate_from_new_pool()
1496 usable_arenas->freepools = pool->nextpool; in allocate_from_new_pool()
1497 usable_arenas->nfreepools--; in allocate_from_new_pool()
1498 if (UNLIKELY(usable_arenas->nfreepools == 0)) { in allocate_from_new_pool()
1500 assert(usable_arenas->freepools == NULL); in allocate_from_new_pool()
1501 assert(usable_arenas->nextarena == NULL || in allocate_from_new_pool()
1502 usable_arenas->nextarena->prevarena == in allocate_from_new_pool()
1503 usable_arenas); in allocate_from_new_pool()
1504 usable_arenas = usable_arenas->nextarena; in allocate_from_new_pool()
1505 if (usable_arenas != NULL) { in allocate_from_new_pool()
1506 usable_arenas->prevarena = NULL; in allocate_from_new_pool()
1507 assert(usable_arenas->address != 0); in allocate_from_new_pool()
1516 assert(usable_arenas->freepools != NULL || in allocate_from_new_pool()
1517 usable_arenas->pool_address <= in allocate_from_new_pool()
1518 (block*)usable_arenas->address + in allocate_from_new_pool()
1524 assert(usable_arenas->nfreepools > 0); in allocate_from_new_pool()
1525 assert(usable_arenas->freepools == NULL); in allocate_from_new_pool()
1526 pool = (poolp)usable_arenas->pool_address; in allocate_from_new_pool()
1527 assert((block*)pool <= (block*)usable_arenas->address + in allocate_from_new_pool()
1529 pool->arenaindex = (uint)(usable_arenas - arenas); in allocate_from_new_pool()
1530 assert(&arenas[pool->arenaindex] == usable_arenas); in allocate_from_new_pool()
1532 usable_arenas->pool_address += POOL_SIZE; in allocate_from_new_pool()
1533 --usable_arenas->nfreepools; in allocate_from_new_pool()
1535 if (usable_arenas->nfreepools == 0) { in allocate_from_new_pool()
1536 assert(usable_arenas->nextarena == NULL || in allocate_from_new_pool()
1537 usable_arenas->nextarena->prevarena == in allocate_from_new_pool()
1538 usable_arenas); in allocate_from_new_pool()
1540 usable_arenas = usable_arenas->nextarena; in allocate_from_new_pool()
1541 if (usable_arenas != NULL) { in allocate_from_new_pool()
1542 usable_arenas->prevarena = NULL; in allocate_from_new_pool()
1543 assert(usable_arenas->address != 0); in allocate_from_new_pool()
1750 usable_arenas = ao->nextarena; in insert_to_freepool()
1751 assert(usable_arenas == NULL || in insert_to_freepool()
1752 usable_arenas->address != 0); in insert_to_freepool()
1786 ao->nextarena = usable_arenas; in insert_to_freepool()
1788 if (usable_arenas) in insert_to_freepool()
1789 usable_arenas->prevarena = ao; in insert_to_freepool()
1790 usable_arenas = ao; in insert_to_freepool()
1791 assert(usable_arenas->address != 0); in insert_to_freepool()
1832 assert(usable_arenas == ao); in insert_to_freepool()
1833 usable_arenas = ao->nextarena; in insert_to_freepool()
1847 assert((usable_arenas == ao && ao->prevarena == NULL) in insert_to_freepool()