You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. First-fit threshold optimization: Changed from 64 bytes to 40 bytes
for very small allocations
- Specifically targets compiler objects like macros, symbols, and
constants
- Reduces scanning overhead for the most common allocation sizes
2. Early termination for best-fit: Added smart exit condition when a
"good enough" match is found
- Exits early when perfect match found OR when chunk size ≤
requested size
- Prevents unnecessary O(n) scanning of the entire freelist
3. Maintained hybrid allocation strategy:
- First-fit for ≤40 bytes (fast allocation for small objects)
- Best-fit for >40 bytes (memory-efficient allocation for large
objects)
0 commit comments