Giter Site home page Giter Site logo

Comments (4)

priitj avatar priitj commented on June 17, 2024

Well, I would agree with you that such scenario is not well supported.

Possible strategies:

  • allocate a lot of memory in advance (wastes memory)
  • if you have many databases, store them all together and use a field as indicator (still wastes memory, but no more than a single database would)
  • split the database into fragments and use some hash-based addressing scheme. Possibly allocate fragments on demand (multiple indexes won't work well, single one could be coerced to work)

from whitedb.

bclothier avatar bclothier commented on June 17, 2024

Just for my education, why can't we simply extend? If I understand everything is an offset within a contiguous block of memory, adding new offsets beyond the first block would spill over into the 2nd block that's allocated on the demand. It's acceptable to keep allocating new blocks which can be then linked so that one block handles a set of offsets, right?

I am also considering whether it's acceptable to dump database, resize, load. The only concern is whether this will cause excessive pause between resizes.

from whitedb.

priitj avatar priitj commented on June 17, 2024

AFAIK we don't have enough control over how the shared memory is mapped into the virtual address space. There should be contiguous unused address space available to fit all the segments and future segments for that idea to work. Some platforms do not even let you control where your segment is mapped.

from whitedb.

bclothier avatar bclothier commented on June 17, 2024

Ah, gotcha. My scenario actually was for a local database; I do not need it in the shared memory. Would that make a difference?

from whitedb.

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.