Skip to content

fix(config): correct off-by-one error in shmemlist_size#85

Merged
danielRep merged 1 commit into
bao-project:mainfrom
lbmeng:config
Feb 16, 2026
Merged

fix(config): correct off-by-one error in shmemlist_size#85
danielRep merged 1 commit into
bao-project:mainfrom
lbmeng:config

Conversation

@lbmeng

@lbmeng lbmeng commented Feb 14, 2026

Copy link
Copy Markdown
Contributor

The example configuration defines shmemlist_size as N, but enumerates members [0] through [N], which actually results in N+1 items.

Adjust the value to use NUM_SHMEMs instead, ensuring consistency with how NUM_VMs is documented.

@Diogo21Costa

Copy link
Copy Markdown
Member

Thanks @lbmeng, that’s a good catch! I’d suggest keeping .shmemlist_size = N and updating the example to enumerate shared memories from index 0 to N-1. That way we avoid introducing a second variable (NUM_SHMEMs) alongside N, which keeps the example simpler and more consistent for readers.

The example configuration defines `shmemlist_size` as N, but enumerates
members [0] through [N], which actually results in N+1 items.

Adjust the index to use N-1 instead, and to ensure consistency with
`vmlist_size`, change NUM_VMs and the comment too.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
@lbmeng

lbmeng commented Feb 16, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the suggestion. I've changed the description of vmlist too for consistenty.

@danielRep danielRep self-assigned this Feb 16, 2026
@danielRep

Copy link
Copy Markdown
Member

@josecm ping

@Diogo21Costa Diogo21Costa self-requested a review February 16, 2026 10:18
@danielRep danielRep merged commit 9a5af2c into bao-project:main Feb 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants