Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Re: B+Tree and Memory Mapped Files

Reply
Thread Tools

Re: B+Tree and Memory Mapped Files

 
 
Thomas Matthews
Guest
Posts: n/a
 
      04-02-2004
ccrabfo wrote:

> Has anyone implemented a memory mapped B+Tree index file system in C++ ? If
> you have, I'd love to discuss implementation techniques and approaches.
>
> ~ thanks
>
>


Yes, I've tried implementing a B+Tree index file system.
I don't really understand what you mean by memory-mapped though,
since memory-mapping is beyond the scope of C++.

Some operating systems allow a file to be treated as memory; others
allow memory to be treated as a file. Hmmm.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

 
Reply With Quote
 
 
 
 
Evan Carew
Guest
Posts: n/a
 
      04-02-2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Well, "mmap", a POSIX.1b standard call has the following in its man page:

The mmap function asks to map length bytes starting at offset offset
from the file (or other object) specified by the file descriptor fd into
memory, preferably at address start. This latter address is a hint
only, and is usually specified as 0. The actual place where the
object is mapped is returned by mmap, and is never 0.


I have in the past used this call to create a 20Mb file, mapped into
memory, which I then use with placement syntax with a STL library
container such as a map. This then allows me to put in my program a
large construct (or many such constructs) which I wouldn't otherwise
want in my main memory.

Evan

Thomas Matthews wrote:
>
> Yes, I've tried implementing a B+Tree index file system.
> I don't really understand what you mean by memory-mapped though,
> since memory-mapping is beyond the scope of C++.
>
> Some operating systems allow a file to be treated as memory; others
> allow memory to be treated as a file. Hmmm.
>


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAbYSDoo/Prlj9GScRAguKAJ92hNvts17L/Ezg9trd51qGFFZq2wCfYaGV
qB5e8tGxn6KjWkU0I7RGcYQ=
=VNhB
-----END PGP SIGNATURE-----
 
Reply With Quote
 
 
 
 
Kevin Goodsell
Guest
Posts: n/a
 
      04-02-2004
Evan Carew wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Well, "mmap", a POSIX.1b standard call has the following in its man page:


OK, but that has nothing to do with C++. And please stop top-posting.
You might need to review the welcome message and section 5 of the FAQ:

http://www.slack.net/~shiva/welcome.txt
http://www.parashift.com/c++-faq-lite/

-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
memory mapped files Peter Huebner NZ Computing 8 04-11-2013 05:12 AM
iostream and memory-mapped file wakun@wakun.com C++ 3 02-23-2006 06:29 PM
Memory Mapped IO and Sample code for win2000 Peter Nolan C++ 1 10-08-2004 10:14 PM
Re: B+Tree and Memory Mapped Files Evan Carew C++ 0 04-01-2004 08:05 PM
right to files on mapped drives throught IIS and ASP.NET chris ASP .Net 2 02-19-2004 03:20 PM



Advertisments