Reserving Space on Disk

Eliot Moss moss at cs.umass.edu
Mon Jul 16 09:05:02 AEST 1990


I don't think tromping through 4 megabytes of newly allocated address space
will be much of a winner myself. I'd do something more along these lines
(error checking omitted):

char buf[ONE_K];
int i;

for (i = 0; i < FOUR_K; ++i)
  write (fd, buf, ONE_K);

You might want to tune the size of buf up larger than what I have, but still
somewhat "reasonable". Something between the size of a track and a cylinder on
the disk might work reasonably well, say 64K or 128K. Enjoy!		Eliot
--

		J. Eliot B. Moss, Assistant Professor
		Department of Computer and Information Science
		Lederle Graduate Research Center
		University of Massachusetts
		Amherst, MA  01003
		(413) 545-4206; Moss at cs.umass.edu



More information about the Comp.unix.wizards mailing list