Re: Memory Mapped File Access

2010-05-30 Thread Robert
On 2010-05-29 21:58:59 +0200, Robert robert.mue...@robertmuench.de said: This could become problematic if the app holds some slices to the MMF and the 2nd open maps to a different memory address. In this case all references to the MMF are invalid. In this case a

Re: Memory Mapped File Access

2010-05-29 Thread Robert
On 2010-05-28 23:41:46 +0200, Robert robert.mue...@robertmuench.de said: 1. How can I expand the size of a MMF after it was created? Replying to myself: Simple, close the file, and re-open with new size. Old content is kept. This should be added to the docs, as it's not totally clear. 2.

Re: Memory Mapped File Access

2010-05-29 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert wrote: On 2010-05-28 23:41:46 +0200, Robert robert.mue...@robertmuench.de said: 1. How can I expand the size of a MMF after it was created? Replying to myself: Simple, close the file, and re-open with new size. Old content is kept. This

Re: Memory Mapped File Access

2010-05-29 Thread BLS
On 28/05/2010 09:28, Robert wrote: Hi, has anyone played around with D and memory mapped files on Windows / Linux? A friend of mine and I want to use D to develop a D native database-system. Yes, sounds crazy and it will take long and we haven't done a lot yet. So don't expect anything to look

Re: Memory Mapped File Access

2010-05-29 Thread Sean Kelly
Robert Wrote: Hi, has anyone played around with D and memory mapped files on Windows / Linux? A friend of mine and I want to use D to develop a D native database-system. Yes, sounds crazy and it will take long and we haven't done a lot yet. So don't expect anything to look at soon :-)

Re: Memory Mapped File Access

2010-05-29 Thread BLS
On 29/05/2010 10:17, Robert wrote: On 2010-05-28 23:41:46 +0200, Robert robert.mue...@robertmuench.de said: 1. How can I expand the size of a MMF after it was created? Replying to myself: Simple, close the file, and re-open with new size. Old content is kept. This should be added to the

Re: Memory Mapped File Access

2010-05-29 Thread Andrei Alexandrescu
On 05/29/2010 10:40 AM, Sean Kelly wrote: Robert Wrote: Hi, has anyone played around with D and memory mapped files on Windows / Linux? A friend of mine and I want to use D to develop a D native database-system. Yes, sounds crazy and it will take long and we haven't done a lot yet. So don't

Re: Memory Mapped File Access

2010-05-29 Thread Andrei Alexandrescu
On 05/29/2010 10:40 AM, Sean Kelly wrote: Robert Wrote: Hi, has anyone played around with D and memory mapped files on Windows / Linux? A friend of mine and I want to use D to develop a D native database-system. Yes, sounds crazy and it will take long and we haven't done a lot yet. So don't

Re: Memory Mapped File Access

2010-05-29 Thread Bane
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...

Re: Memory Mapped File Access

2010-05-29 Thread Robert
On 2010-05-29 17:21:18 +0200, BLS windev...@hotmail.de said: in opposite to Bane I think this Job is doable and makes perfectly sense. Hi Bjoern, thanks to support this idea. IMO used in a smart way MMF make a lot of things simpler. Especially with D's array slices I see a perfect match.

Re: Memory Mapped File Access

2010-05-29 Thread Robert
On 2010-05-29 18:30:13 +0200, Andrei Alexandrescu seewebsiteforem...@erdani.org said: Andrei and I had talked a while back about adding memory-mapped file support to the GC and then it fell off the radar while we worked on other things. I'll see if I can remember how it was to work. The

Re: Memory Mapped File Access

2010-05-29 Thread Robert
On 2010-05-29 10:17:34 +0200, Robert robert.mue...@robertmuench.de said: Replying to myself: Simple, close the file, and re-open with new size. Old content is kept. This should be added to the docs, as it's not totally clear. This could become problematic if the app holds some slices to the

Re: Memory Mapped File Access

2010-05-29 Thread Andrei Alexandrescu
On 05/29/2010 02:52 PM, Robert wrote: On 2010-05-29 18:30:13 +0200, Andrei Alexandrescu seewebsiteforem...@erdani.org said: Andrei and I had talked a while back about adding memory-mapped file support to the GC and then it fell off the radar while we worked on other things. I'll see if I can

Re: Memory Mapped File Access

2010-05-29 Thread Robert
On 2010-05-29 23:23:06 +0200, Andrei Alexandrescu seewebsiteforem...@erdani.org said: There's nothing to sketch, really. The runtime tracks the opened memory-mapped files and the memory ranges associated with them. Upon a collections, if a file's memory has been successfully freed, the file

Memory Mapped File Access

2010-05-28 Thread Robert
Hi, has anyone played around with D and memory mapped files on Windows / Linux? A friend of mine and I want to use D to develop a D native database-system. Yes, sounds crazy and it will take long and we haven't done a lot yet. So don't expect anything to look at soon :-) Thanks Robert.

Re: Memory Mapped File Access

2010-05-28 Thread Bane
Robert Wrote: Hi, has anyone played around with D and memory mapped files on Windows / Linux? A friend of mine and I want to use D to develop a D native database-system. Yes, sounds crazy and it will take long and we haven't done a lot yet. So don't expect anything to look at soon :-)

Re: Memory Mapped File Access

2010-05-28 Thread Robert
On 2010-05-28 13:06:04 +0200, Bane branimir.milosavlje...@gmail.com 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