Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

代码问题 #24

Open
cestlascorpion opened this issue Apr 11, 2019 · 0 comments
Open

代码问题 #24

cestlascorpion opened this issue Apr 11, 2019 · 0 comments

Comments

@cestlascorpion
Copy link

在 shm_object_pool.c 的 shm_object_pool_remove() 函数中,如果出现了op->index != op->obj_pool_info->queue.head,在while循环过程中,原本待移除的obj_offset值会被覆盖。在循环开始前只保留了该offset值所处的索引,即op->index,实际上应该保存op->offsets[op->index]再进入循环。
不过我暂时没有测试到不等的情况,也许理解上出现了偏差,请多指教。

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

No branches or pull requests

1 participant