Comments (4)
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.
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.
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.
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)
- wgdb ls or is there a way to list all databases in memory? HOT 1
- dump files not working after reboot HOT 1
- Ordering of result of wg_find_record_int function HOT 1
- Compilation Warnings on Windows (x64) HOT 1
- Question: find first missing entry HOT 2
- Image processing HOT 1
- wg_database_freesize result never decreases HOT 2
- Incorrect consistency check
- wg memory error: cannot attach to shared memory (No permission). with gtest HOT 2
- http://whitedb.org/ is down HOT 1
- commercial licence HOT 1
- Using whitedb between (docker) containers HOT 2
- Clarification HOT 1
- DB names HOT 2
- indexapi.h missing C extern for C++ HOT 1
- Issue deleting a record who has the same value in a Template Index Column as another record HOT 5
- Error when restoring the database (with indexing) from the log file.
- License Question HOT 2
- BUILD FAIL: configure cannot guess build type HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whitedb.