![]() | |||||||||||||
Messages in this thread |
Adam Heath <adam@brainiac.egr.msu.edu> wrote: > My main concern is how mmap will work on other platforms. The index file > is a simple format: "<varname> <helpfile> <start> <end>", with everything > stored as a string. Does anyone see anyone problems with this approach? Watchout if the index file ends exactly on a page boundary, you'll probably get a segmentation violation as the program tries to access the non-existant null at the end of the file. When you mmap the file, add 1 to the file size to prevent this. (Try padding the file out manually and test). I saw this with a mkover program which had exactly this problem when a news article was exactly 32768 bytes long. -- Peter Fox | ||||||||||||
| Last update: 2005-03-22 12:41 [W:0.198 / U:0.000 seconds] ©2003-2008 Jasper Spaans | |||||||||||||