Re: Subject: Configure.help speedup(no 'sed', builds byte index)

linux-kernel subscriber (kernel@roestock.demon.co.uk)
Thu, 29 Jan 1998 17:22:44 GMT


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