mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2024-12-30 01:46:16 -05:00
slab internal fragmentation is always the same
This commit is contained in:
parent
c12d6795de
commit
1fed72a9c3
@ -293,7 +293,7 @@ slabs containing them:
|
|||||||
> each doubling in size, which limits internal fragmentation to approximately 20% for all but the
|
> each doubling in size, which limits internal fragmentation to approximately 20% for all but the
|
||||||
> smallest size classes
|
> smallest size classes
|
||||||
|
|
||||||
| size class | worst case internal fragmentation | slab slots | slab size | worst case internal fragmentation for slabs |
|
| size class | worst case internal fragmentation | slab slots | slab size | internal fragmentation for slabs |
|
||||||
| - | - | - | - | - |
|
| - | - | - | - | - |
|
||||||
| 16 | 93.75% | 256 | 4096 | 0.0% |
|
| 16 | 93.75% | 256 | 4096 | 0.0% |
|
||||||
| 32 | 46.875% | 128 | 4096 | 0.0% |
|
| 32 | 46.875% | 128 | 4096 | 0.0% |
|
||||||
|
@ -36,7 +36,7 @@ def page_align(size):
|
|||||||
return (size + 4095) & ~4095
|
return (size + 4095) & ~4095
|
||||||
|
|
||||||
print("| ", end="")
|
print("| ", end="")
|
||||||
print("size class", "worst case internal fragmentation", "slab slots", "slab size", "worst case internal fragmentation for slabs", sep=" | ", end=" |\n")
|
print("size class", "worst case internal fragmentation", "slab slots", "slab size", "internal fragmentation for slabs", sep=" | ", end=" |\n")
|
||||||
print("| ", end='')
|
print("| ", end='')
|
||||||
print("-", "-", "-", "-", "-", sep=" | ", end=" |\n")
|
print("-", "-", "-", "-", "-", sep=" | ", end=" |\n")
|
||||||
for size, slots, fragmentation in zip(size_classes, size_class_slots, fragmentation):
|
for size, slots, fragmentation in zip(size_classes, size_class_slots, fragmentation):
|
||||||
|
Loading…
Reference in New Issue
Block a user