Git Product home page Git Product logo

Comments (3)

resuna avatar resuna commented on July 20, 2024

The use of absolute pointers allowed shared memory speedtables to be implemented without modifying all the speedtables code to support shared memory. Most of the code doesn't treat shared and private speedtables any differently. For one example, the only modification in the skiplist code was to pass the shared memory pool to the allocator, and change the order of some of the operations on skiplists to guarantee that the structures were always internally consistent without locking. I'm not even sure that guarantee will hold with relative pointers, since pointer indirection wouldn't be atomic any more.

from speedtables.

lehenbauer avatar lehenbauer commented on July 20, 2024

Agreed, this would be very difficult to achieve and would affect non-shared-memory speedtables performance negatively, about for sure. The atomicity issue Peter brought up could be solved with locks, but that could in a ginormous amount of locking.

I think with a 64-bit address space it wouldn't be difficult to map multiple shared memory speedtables to specific addresses in a non-conflicting way at the cost of a slight hassle. This will require multiple shared memory speedtables to actually work, which it doesn't currently, due to some static variables in ctables/shared/shared.c.

from speedtables.

bovine avatar bovine commented on July 20, 2024

Boost supports relative pointers in shared-memory regions using the offset_ptr template:
http://www.boost.org/doc/libs/1_51_0/doc/html/interprocess/offset_ptr.html

Although it still incurs a performance penalty, it might be worth investigating. The 64-bit address space does potentially mitigate the need for this, as long as an unused region of memory can be initially located.

from speedtables.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.