-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement new ABI for segment_manager that supports overaligned types.
- Loading branch information
1 parent
d6c4649
commit cbeb5b5
Showing
6 changed files
with
1,140 additions
and
630 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
cbeb5b5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit seems to cause a failure in the Lockfree tests:
See https://github.com/boostorg/boost/actions/runs/10976479575/job/30477262572.
cbeb5b5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's strange, it only fails with cmake and ubuntu latest. b2 with older ubuntus seems fine...
Anyway, it seems that the new ABI has a bit more overhead because it properly aligns data as requested (and lockfree requires queue to be BOOST_LOCKFREE_CACHELINE_BYTES bytes aligned) so that the memory size of the segment must be slightly bigger.
Changing the following line:
https://github.com/boostorg/lockfree/blob/boost-1.86.0/test/queue_interprocess_test.cpp#L30
managed_shared_memory segment(create_only, "boost_queue_interprocess_test_shm", 262144);
with something 1% bigger (
262144*101/100
), fixes the test failure. I guess the previous value was selected empirically with the old implementations as the minimum size that was enough to hold the queue.cbeb5b5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timblechmann Please see above