Repository navigation
feat(shm): 升级 slotsboxmalloc v0.1.7 (v3) 并适配在线扩容 - #47
Merged
Merged
Conversation
carsontung666
force-pushed
the
feat/adapt-sbo-v3
branch
from
October 19, 2026 17:19
9c6bfa6 to
2f48f9f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
配合已合入并发布的
array2d/slotsboxmalloc#13(v0.1.7, v3 格式):deps.json中slotsboxmalloc从v0.1.6升至v0.1.7。src/kvspace.c中定义SBO_MIN_SHARD_BYTES (1ULL << 40),确保kvspace-cSHM 在线扩容所需的单 root 池布局 (root_slots == 1)。sbo_box()改用m->box_off定位 8B 对齐后的sbo_box_t;sbo_head_grow()同步更新m->max_blocks;sbo_data_grow()适配 v3 的child_mask/free_mask/sbo_box_format/sbo_combined/hot_id1缓存与m->slot_shift;tests/test_shm_resize.c中t_bad_root_slots的root_slots偏移更新为 v3sbo_meta_t的 byte 38。ctest(含test_shm_resize的t_data_grow/t_cross_process/t_punch/t_bad_root_slots/t_head_grow)全部通过。