![]() |
|
#1
|
|||
|
|||
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
|
|||
|
|||
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 GIDBlog
Toyota - 2009 May Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
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