|
-
November 5th, 2025, 04:55 PM
#1
I ported the lock free skiplist from the art of multiprocessor programming to C++
Last edited by jay403; November 9th, 2025 at 01:06 PM.
-
November 5th, 2025, 05:15 PM
#2
Re: I ported the lock free skiplist from the art of multiprocessor programming to C++
this does assume you either finish implementing the epoch manager (i ripped this out of my task scheduler and just wanted the list to run separately for a demo -- you can see the full code in the other project in the repo which is a hobby project im working on)
or have another memory management model in place in the demo it WILL leak memory because epochmanager is just a dummy class not the real one -- in the real system you tick() the epochmanager after threads finish their tasks or another reasonable time in the program -- i used a clock -- you could base it on list operations too on a counter but time is a decent approx of garbage collection as long as you KNOW it will be deleted in a few cycles
this then IF the time is beyond your set safe threshold time deletes the memory like crude timer based garbage collection but this is just an example of the list since i couldnt find one when i was trying to do it
-
March 4th, 2026, 08:00 AM
#3
Re: I ported the lock free skiplist from the art of multiprocessor programming to C++
The C++ lock-free skiplist you ported requires a memory management system to avoid leaks. In your demo, the `EpochManager` is just a placeholder, so memory isn?t reclaimed. In a full system, you would tick the epoch manager after threads finish or use a timer/counter to safely delete nodes, effectively acting as simple garbage collection. Without this, the demo will leak memory.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|