Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!unisoft!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.system Subject: Re: Setting System Heap Message-ID: <11311@hoptoad.uucp> Date: 5 May 90 09:02:57 GMT References: <1990May1.231447.29824@agate.berkeley.edu> <1990May3.012140.10133@gaudi.CSUFresno.EDU> <400.264065ea@waikato.ac.nz> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 32 In article <400.264065ea@waikato.ac.nz> ccc_ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes: >Files containing INITs (i e those of type "INIT", "RDEV" or "cdev") >can have a "sysz" resource in them, which specifies the minimum >amount of contiguous free space that the code will need. The INIT 31 >mechanism will expand the system heap as necessary to fill this need. Yes, this is correct -- and it's why the sysz suggestions for expanding the heap won't work in the naive sense that some have suggested. The sysz does not add n bytes to the system heap, n bytes being the number of bytes stored in the resource. It make sure that there are n contiguous bytes free in the system heap. If you run a file which has only a sysz of 50K (and an RTS INIT to make sure your file runs), then it will check if there are 50K free bytes. If there are, it will allocate nothing. But let's say your heap-hacker INIT does cause the 50K to be allocated, because there isn't enough free when it runs -- then the storage you've allocated may be used up later, causing no overall expansion. If the next INIT wants 50K, then the next INIT's sysz will act as a no-op, because there are already 50K bytes allocated. So, the sysz resource solution can work, but only if you set it to the total size you want the system heap to be, not the extra size you want to add. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com It is not only fallacious to ignore points, or to answer them solely with preconceived and contrived arguments: it is also very, very rude. Someone who behaves in this way has only themselves to blame if things become heated.