Skip to content

Commit 69a1a44

Browse files
authored
Fix small chunks going into very large zones
1 parent d7ad2a2 commit 69a1a44

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/iso_alloc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,9 @@ INTERNAL_HIDDEN iso_alloc_zone_t *is_zone_usable(iso_alloc_zone_t *zone, size_t
813813
* chunks smaller than ZONE_1024 */
814814
if(size > ZONE_1024 && zone->chunk_size >= (size << WASTED_SZ_MULTIPLIER_SHIFT)) {
815815
return NULL;
816+
}
817+
if(size <= ZONE_1024 && zone->chunk_size > ZONE_1024) {
818+
return NULL;
816819
}
817820

818821
if(zone->next_free_bit_slot != BAD_BIT_SLOT) {

0 commit comments

Comments
 (0)