CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2025
    Posts
    2

    I ported the lock free skiplist from the art of multiprocessor programming to C++

    deleted
    Last edited by jay403; November 9th, 2025 at 01:06 PM.

  2. #2
    Join Date
    Nov 2025
    Posts
    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

  3. #3
    Join Date
    Jan 2026
    Posts
    12

    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
  •  





Click Here to Expand Forum to Full Width

Featured