Skip to content

fix issue where we look for chunk size but its zero page #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/iso_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,9 +808,9 @@ INTERNAL_HIDDEN iso_alloc_zone *is_zone_usable(iso_alloc_zone *zone, size_t size
/* If the cache for this zone is empty we should
* refill it to make future allocations faster
* for all threads */
if(zone->free_bit_slot_cache_usable >= zone->free_bit_slot_cache_index) {
fill_free_bit_slot_cache(zone);
}
//if(zone->free_bit_slot_cache_usable >= zone->free_bit_slot_cache_index) {
// fill_free_bit_slot_cache(zone);
//}

bit_slot_t bit_slot = get_next_free_bit_slot(zone);

Expand Down Expand Up @@ -1731,6 +1731,12 @@ INTERNAL_HIDDEN size_t _iso_chunk_size(void *p) {
return 0;
}

#if NO_ZERO_ALLOCATIONS
if(p == _zero_alloc_page) {
return 0;
}
#endif

#if ALLOC_SANITY
LOCK_SANITY_CACHE();
_sane_allocation_t *sane_alloc = _get_sane_alloc(p);
Expand Down