Article View: comp.sys.amiga.tech
Article #11219Re: memalign (can it be simulated?)
From: Jim Levie
Date: Fri, 27 Jan 1989 06:37
Date: Fri, 27 Jan 1989 06:37
36 lines
1706 bytes
1706 bytes
In article <0164.AA0164@julie> mcr@julie.UUCP (Michael Richardson) writes:
>
... stuff deleted ...
>
> I have discovered that the Manx malloc is a fake - is uses a 40K
>arena which is allocated at run time regardless of how much malloc'ing
>you intend to do. (Do any of the library functions call malloc? I'd like
>to stay away from them if possible)
I don't know how you determined this, but a quick peek at the library
source says that each malloc(size) actually calls
lmalloc((unsigned long)size) which in turn ultimately does an
"AllocMem(size+sizeof(struct mem), 0L)", where struct mem is declared as:
struct mem {
struct mem *next;
long size;
}
The mem struct is of course necessary for exit() cleanup and so forth.
Amazingly handy those library sources!!
>
> :!mcr!:
> Michael Richardson Amiga
> v--------+
> UUCP: uunet!attcan!lsuc!nrcaer!julie!mcr | INTERNET mcr@doe.carleton.ca
> Fido: Michael Richardson @ 1:163/109.10<--+ Alter @ 7:483/109.10
--
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
Jim Levie REMTECH Inc Huntsville, Al
The opinions expressed above are just that.
Ph. (205) 536-8581 email: uunet!ingr!b11!jim
Technical Details
Message-ID:
<365@b11.INGR.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!amdcad!sun!pitstop!sundc!seismo!uunet!ingr!b11!jimReferences:
<0164.AA0164@julie>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!amdcad!sun!pitstop!sundc!seismo!uunet!ingr!b11!jim From: jim@b11.INGR.COM (Jim Levie ) Newsgroups: comp.sys.amiga.tech Subject: Re: memalign (can it be simulated?) Message-ID: <365@b11.INGR.COM> Date: 27 Jan 89 06:37:05 GMT References: <0164.AA0164@julie> Reply-To: jim@b11.UUCP (Jim Levie ) Organization: Far from the halls of Amber Lines: 36