S
shahbazc
I'm writing a prototype of a database management system (I know plenty
exist, I'm writing one anyway
), so I've decided to use NIO (jdk
1.5). I have two questions regarding memory mapping a file:
1. Is there anything wrong with mmaping a HUGE file (the complete limit
allowed in 32 or 64 bit systems)? For 32 bit systems, I'll just break
up my table among several files and map all of those.
2. Is there a limit to how many files I can have mapped at once (what
if I have 500 tables, all of which have a file channel pointing to
them)...I seem to recall that there was a OS imposed limit.
Basically I want to let the OS manage memory for me. I'm not really
concerned about issues of compatibility accross platforms (although I
would appreciate reading about caveats for windows, linux, sun, ibm,
etc.) I also realize that os managed memory will not be as effecient
as what I could do myself...but I very quickly get a working
prototype...so I don't care if it is not the absolute best solution.
I haven't read anything comprehensive regarding memory mapping using
Java's NIO. I suspect there is more material in OS or C/C++ books, if
someone has any good pointers, I'll appreciate getting them. Thanks!
-Falcon
exist, I'm writing one anyway
1.5). I have two questions regarding memory mapping a file:
1. Is there anything wrong with mmaping a HUGE file (the complete limit
allowed in 32 or 64 bit systems)? For 32 bit systems, I'll just break
up my table among several files and map all of those.
2. Is there a limit to how many files I can have mapped at once (what
if I have 500 tables, all of which have a file channel pointing to
them)...I seem to recall that there was a OS imposed limit.
Basically I want to let the OS manage memory for me. I'm not really
concerned about issues of compatibility accross platforms (although I
would appreciate reading about caveats for windows, linux, sun, ibm,
etc.) I also realize that os managed memory will not be as effecient
as what I could do myself...but I very quickly get a working
prototype...so I don't care if it is not the absolute best solution.
I haven't read anything comprehensive regarding memory mapping using
Java's NIO. I suspect there is more material in OS or C/C++ books, if
someone has any good pointers, I'll appreciate getting them. Thanks!
-Falcon