Skip to content

Commit 88af20d

Browse files
committed
fix compile bug introduced in last PR when thread cache isnt used
1 parent 1e3d006 commit 88af20d

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/iso_alloc.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,11 +1346,11 @@ INTERNAL_HIDDEN iso_alloc_big_zone *iso_find_big_zone(void *p) {
13461346
INTERNAL_HIDDEN iso_alloc_zone *iso_find_zone_bitmap_range(void *p) {
13471347
iso_alloc_zone *zone = NULL;
13481348

1349+
#if THREAD_SUPPORT && THREAD_CACHE
13491350
/* Locally store the thread zone index's to ensure
13501351
* we don't check them twice if the cache misses */
13511352
uint16_t zones_checked[THREAD_ZONE_CACHE_SZ];
13521353

1353-
#if THREAD_SUPPORT && THREAD_CACHE
13541354
/* Hot Path: Check the thread cache for a zone this
13551355
* thread recently used for an alloc/free operation */
13561356
for(int64_t i = 0; i < thread_zone_cache_count; i++) {
@@ -1368,10 +1368,11 @@ INTERNAL_HIDDEN iso_alloc_zone *iso_find_zone_bitmap_range(void *p) {
13681368
for(int32_t i = 0; i < _root->zones_used; i++) {
13691369
zone = &_root->zones[i];
13701370

1371+
#if THREAD_SUPPORT && THREAD_CACHE
13711372
if(i < thread_zone_cache_count && zones_checked[i] == zone->index) {
13721373
continue;
13731374
}
1374-
1375+
#endif
13751376
UNMASK_ZONE_PTRS(zone);
13761377
if(zone->bitmap_start <= p && (zone->bitmap_start + zone->bitmap_size) > p) {
13771378
MASK_ZONE_PTRS(zone);
@@ -1386,11 +1387,11 @@ INTERNAL_HIDDEN iso_alloc_zone *iso_find_zone_bitmap_range(void *p) {
13861387
INTERNAL_HIDDEN iso_alloc_zone *iso_find_zone_range(void *p) {
13871388
iso_alloc_zone *zone = NULL;
13881389

1390+
#if THREAD_SUPPORT && THREAD_CACHE
13891391
/* Locally store the thread zone index's to ensure
13901392
* we don't check them twice if the cache misses */
13911393
uint16_t zones_checked[THREAD_ZONE_CACHE_SZ];
13921394

1393-
#if THREAD_SUPPORT && THREAD_CACHE
13941395
/* Hot Path: Check the thread cache for a zone this
13951396
* thread recently used for an alloc/free operation */
13961397
for(int32_t i = 0; i < thread_zone_cache_count; i++) {
@@ -1400,6 +1401,7 @@ INTERNAL_HIDDEN iso_alloc_zone *iso_find_zone_range(void *p) {
14001401
MASK_ZONE_PTRS(zone);
14011402
return zone;
14021403
}
1404+
14031405
zones_checked[i] = zone->index;
14041406
MASK_ZONE_PTRS(zone);
14051407
}
@@ -1408,10 +1410,11 @@ INTERNAL_HIDDEN iso_alloc_zone *iso_find_zone_range(void *p) {
14081410
for(int32_t i = 0; i < _root->zones_used; i++) {
14091411
zone = &_root->zones[i];
14101412

1413+
#if THREAD_SUPPORT && THREAD_CACHE
14111414
if(i < thread_zone_cache_count && zones_checked[i] == zone->index) {
14121415
continue;
14131416
}
1414-
1417+
#endif
14151418
UNMASK_ZONE_PTRS(zone);
14161419
if(zone->user_pages_start <= p && (zone->user_pages_start + ZONE_USER_SIZE) > p) {
14171420
MASK_ZONE_PTRS(zone);

0 commit comments

Comments
 (0)