Path: utzoo!utgpu!water!watmath!watmsg!achowe From: achowe@watmsg.waterloo.edu (CrackerJack) Newsgroups: comp.sys.atari.st Subject: Memory Allocator - who wants it? Message-ID: <20813@watmath.waterloo.edu> Date: 12 Sep 88 12:24:45 GMT Sender: daemon@watmath.waterloo.edu Reply-To: achowe@watmsg.UUCP (CrackerJack) Distribution: world Organization: U. of Waterloo, Ontario Lines: 30 As a recent exercise I have written my own memory allocator to be used with another project at the moment. It is designed to request heaps of 64k from the system (configurable) and then partion that up even further as request come in. Garbage collection is done on the heaps so that when a entire 64k heap is freed that is then returned to the system. No garbage collection is done on the partioning level. Overhead for an allocated cell is on 2 bytes (the size of the request). I used unsigned int (Acylon) for the storage type. The code code be altered to use unsigned long if I get gcc soon. This will alter the system heap limit of 64k. So anyone want a copy? Also how to (who to) send it to for posting to atari.source? NOTE that use of this allocator requires that people use the memory allocated correctly!!!! None of this off-by-one errors that write just outside of allocated request (al-la Malloc compatiblity problem). Also for anyone who wishes to try this on their own have a look at Knuth and the source provided for a malloc in K&R C Programming Language first edition for a simple example. My method is similar. -- achowe@watmsg.waterloo.edu | "Killed by pirates is good." __ _ | - The Princess Bride (movie) / _ _ _ |/ _ _ | _ _ |/ | \__| `<_\<_ |\|= | ` \_/<_\<_ |\ | disclaimer...