Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 4/15/85; site ucbvax.ARPA Path: utzoo!utcs!lsuc!pesnta!hplabs!ucbvax!hamachi From: hamachi@ucbvax.ARPA Newsgroups: net.micro.mac Subject: Re: Aztec C malloc Message-ID: <8795@ucbvax.ARPA> Date: Fri, 5-Jul-85 02:47:07 EDT Article-I.D.: ucbvax.8795 Posted: Fri Jul 5 02:47:07 1985 Date-Received: Sat, 6-Jul-85 05:34:23 EDT Sender: hamachi@ucbvax.ARPA Organization: University of California at Berkeley Lines: 16 From: hamachi (Gordon Hamachi) I've noticed exactly the same thing with Megamax C. It sure is the pits when something as funadmental as malloc screws up. One funny thing is that malloc works until your program grows beyond a certain size. You can store into malloc'ed locations by masking off the upper bits of the returned value, but that is the kind of horrible kludge that makes hackers run screaming into the night. Depending on how much memory you have, the number of bits to mask changes. Also, when you try to free one of these, the Mac is likely to crash. A better alternative is to use the toolbox calls and/or manage your own storage. --Gordon Hamachi