Path: utzoo!utgpu!water!watmath!egisin From: egisin@watmath.waterloo.edu (Eric Gisin) Newsgroups: comp.os.minix Subject: Re: Speed of execution related to chmem value !?! Keywords: fix chmem time memory Message-ID: <17859@watmath.waterloo.edu> Date: 28 Mar 88 19:40:45 GMT References: <7616@nswitgould.OZ> Organization: U of Waterloo, Ontario Lines: 13 In article <7616@nswitgould.OZ>, nick@nswitgould.OZ (Nick Andrew) writes: > > I'm very puzzled by the behavior of the Minix Fix program. When run > with a stack+malloc size of 3000 bytes, Fix runs extremely slowly. When run > with an additional 3000 bytes to play around with, Fix runs TEN times as > fast. [ Background: Minix 1.2, using 1.2 lib & 1.1 compiler ] > This was a common problem with large programs on V7 too. The program fopen's a file. Fopen cannot malloc a buffer because it cannot expand the data segment. So fopen leaves the file unbuffered, and everything gets read/written one byte at a time. That's why you see the high system time.