|
-
June 4th, 2008, 10:35 AM
#1
Working with large files.
Hey.
I ran into a sort of a problem. I am attempting to work with large files efficiently (ie. 1 GB size for example), and my current implementaiton is lacking.
I am using memory mapped files, that remap themselves when I am half way though the mapped section.
So, I am looking at the file, i get to the 50% mark in the mapped section, and the program reloads another file section that start 25% later then the last one, thus, i am only a quarter into the updated mapped section.
If i am walking thourhg the file backwards, i remap the file to 3/4 view when i am 10% from the boundary of the mapped section.
Anyways, this is a quick algo that i came up during lunch, but it probably sucks quite a bit.
I was thinking about mapping 3 section into memory, current, before and after. with an overlap between them to allow for smooth switching, but i also think that this is not the best way to go about this.
I was wondering how i can make my work with virtual mapped files more efficient?
Thx in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|