GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 08-Apr-2009, 22:32
man4ish man4ish is offline
New Member
 
Join Date: Apr 2008
Posts: 2
man4ish is on a distinguished road

Memory map in C++


I am working on file indexing and successful in indexing and retrieving the records. But If file is too big having millions of records then it takes time to read the index file. Is there any way that index is stored in memory and when i run my program i can use that map?

Manish
  #2  
Old 09-Apr-2009, 05:50
L7Sqr L7Sqr is offline
Member
 
Join Date: Jul 2005
Location: constant limbo
Posts: 234
L7Sqr is a jewel in the roughL7Sqr is a jewel in the rough

Re: Memory map in C++


What index are you talking about?
If it is the data within your file I'm afraid you are going to have to be more specific as we have no idea what file you are working with.
A file can be indexed by seeking to a position within it. Google file seek operations and choose results pertinent to your platform.

If you are concerned about how long it takes to read a file with millions of entries and want to load that into memory consider that in order to do that you
1) Have to have enough memory to support the size of the file you are dealing with
2) Will have to load the entire contents into the memory region anyway

If you are only reading this one time then there is no benefit to memory mapping due to #2. If the file is too large for your memory then you will see limited benefit as you likely spend a large amount of time being paged in and out of memory.
__________________
My personal site: Utilities for text processing, debugging, testing and plotting
 
 

Recent GIDBlogToyota - 2009 May Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A Complete Guide to SD Memory Cards haulkook Computer Hardware Forum 0 02-Jul-2008 00:27
A Few Tips on Buying Good Memory Cards and other Hi-Tech Electronic Accessories haulkook Computer Hardware Forum 0 02-Jun-2008 04:53
Hard drive/CPU Diagnoses Issues binarybug Computer Hardware Forum 1 22-Jan-2007 20:23
Pipeline freeze simulation darklightred C++ Forum 6 27-Jul-2006 20:37
[Tutorial] Pointers in C (Part I) Stack Overflow C Programming Language 1 08-Apr-2005 19:35

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 13:11.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.