Skip to content

Commit b6a0e2e

Browse files
authored
Merge pull request #233 from writegsqword/master
Fix small chunks going into very large zones
2 parents d7ad2a2 + 69a1a44 commit b6a0e2e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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)