achowe@watmsg.waterloo.edu (CrackerJack) (09/12/88)
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...
david@bdt.UUCP (David Beckemeyer) (09/15/88)
I wrote a malloc (with an lmalloc too) a long, long time ago and posted it to Compuserve (I think it's still there). I used it for several years. If there is interest I'll post it to comp.sources.atari.st. Or if individuals want it, I'll e-mail it to them. -- David Beckemeyer | E-mail: david@bdt.UUCP Beckemeyer Development Tools | {ames,clyde,decwrl}!pacbell!hoptoad!bdt!david 478 Santa Clara Ave. | ucbvax!ucsfcgl!hoptoad!bdt!david Oakland, CA 94610 | uunet!lll-winken!gethen!bdt!david