Refactor (MALLOCX_ARENA_MAX + 1) to be MALLOCX_ARENA_LIMIT.

This resolves #673.
This commit is contained in:
Jason Evans
2017-05-13 15:20:48 -07:00
parent 909f0482e4
commit 18a83681cf
5 changed files with 11 additions and 11 deletions

View File

@@ -13,10 +13,10 @@ extent_arena_get(const extent_t *extent) {
* The following check is omitted because we should never actually read
* a NULL arena pointer.
*/
if (false && arena_ind > MALLOCX_ARENA_MAX) {
if (false && arena_ind >= MALLOCX_ARENA_LIMIT) {
return NULL;
}
assert(arena_ind <= MALLOCX_ARENA_MAX);
assert(arena_ind < MALLOCX_ARENA_LIMIT);
return (arena_t *)atomic_load_p(&arenas[arena_ind], ATOMIC_ACQUIRE);
}