Skip to content

Commit b4cf2bd

Browse files
authored
Merge pull request #58 from struct/fix_issue_56
fix issue where we look for chunk size but its zero page
2 parents 1b1453d + 4858c18 commit b4cf2bd

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/iso_alloc.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -808,9 +808,9 @@ INTERNAL_HIDDEN iso_alloc_zone *is_zone_usable(iso_alloc_zone *zone, size_t size
808808
/* If the cache for this zone is empty we should
809809
* refill it to make future allocations faster
810810
* for all threads */
811-
if(zone->free_bit_slot_cache_usable >= zone->free_bit_slot_cache_index) {
812-
fill_free_bit_slot_cache(zone);
813-
}
811+
//if(zone->free_bit_slot_cache_usable >= zone->free_bit_slot_cache_index) {
812+
// fill_free_bit_slot_cache(zone);
813+
//}
814814

815815
bit_slot_t bit_slot = get_next_free_bit_slot(zone);
816816

@@ -1731,6 +1731,12 @@ INTERNAL_HIDDEN size_t _iso_chunk_size(void *p) {
17311731
return 0;
17321732
}
17331733

1734+
#if NO_ZERO_ALLOCATIONS
1735+
if(p == _zero_alloc_page) {
1736+
return 0;
1737+
}
1738+
#endif
1739+
17341740
#if ALLOC_SANITY
17351741
LOCK_SANITY_CACHE();
17361742
_sane_allocation_t *sane_alloc = _get_sane_alloc(p);

0 commit comments

Comments
 (0)