CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2002
    Posts
    13

    B Tree to manage large data in Memory

    Hi All,

    Can B Tree be used to manage large data in memory?

    Say I have to load a large file (size greater than available RAM), I want to manage its loading/inloading from RAM myself, instead of depending upon OS's virtual memory management.

    So can, in any way, B Tree be used for this purpose. I know other methods, just want to know about technique (if any) using B Tree.

    Regards,

    Waqar

  2. #2
    Join Date
    Jun 2002
    Location
    Letchworth, UK
    Posts
    1,020
    Answer is yes: the B-tree can be used for anything which requires a quick lookup but the OSs VM management may be more efficient. You cannot tell when there is a page fault so trying to work around the OS may be a problem, unless it is an OS that is really dumb (like DOS).

    B-trees can be faster than a generic hash table. There are 2 types of B-tree: the B tree and the B+ tree. In fact, the more entries you store per node, the more chance you will have of getting a hit. You can of course use a hash algorithm to speed up the search within a node.

    Historic Off topic nonsense: B could stand for Balanced, Bushy, Boeing or Bayer since it was first publicised as a balanced, bushy tree by Bayer of Boeing Corp.
    Succinct is verbose for terse

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured