Memory Mapped File Access

Robert robert.muench at
Fri May 28 14:41:46 PDT 2010

On 2010-05-28 13:06:04 +0200, Bane <branimir.milosavljevic at> said:

> MMapped files work just fine, I played/am playing with them.

I posted before I saw that there is a MmFile class :-)

So, I have the first questions:

1. How can I expand the size of a MMF after it was created?

2. If I specify 100GB file-size will it always be written once to disk 
even if there is nothing in it? Or does the OS use sparse-files as well?

> I greet your idea to learn how to build database, its great way to 
> spend time for people programming that stuff.
> And you are right - trying to make operational database like this is 
> crazy, crazy idea. It will require from you HUGE investment in time & 
> learning to make it remotely reliable and usable. Here I talk about 
> ACID compliance. If you are trying to build something that works 
> *mostly* of the time and saves key -> value pairs in file then it is 
> much simpler.

Ok, I need to be fair. We are quite good at these things. Anyone 
remembering Adimens from the Atari (later for Windows as well)? It 
was/is a ACID compliant SQL database with row-level locking etc.

And, it was written by my friend and sold more than 500.000 times.

Yes, we are crazy... but chances are high we will get something done. I 
need to get some practice with D but shouldn't be that hard.

> SQLite is a great project you could learn a lot from. It has tons of 
> useful docs about making DB, its open source, its been around for 10 
> years and its probably better job then you could ever do.

Yep, I use it since several years. A great piece of software.


More information about the Digitalmars-d mailing list