🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #11168

Re: memalign (can it be simulated?)

#11168
From: Michael "Ford" Ditto
Date: Thu, 26 Jan 1989 00:51
19 lines
1408 bytes
In article <0164.AA0164@julie> mcr@julie.UUCP (Michael Richardson) writes:
>  The normal AllocMem is fine, I DO know the block size, but it wont
>guarantee a 4K boundary. I have thought about AllocMem'ing 8K, taking the
>middle 4K chunk and returning the rest, but I am not sure if this will
>work.

Yes, you can return parts of an allocated block, but it is important to
know that the system will always round the address down to a multiple of
MEM_BLOCKSIZE and the size is similarly rounded up.  In your case this
probably fits in will with what you are doing.  Since MEM_BLOCKSIZE (in
<exec/memory.h>) is a constant (8), it presumably will not change in an
incompatible way in future releases.
-- 
					-=] Ford [=-

"The number of Unix installations	(In Real Life:  Mike Ditto)
has grown to 10, with more expected."	ford@kenobi.cts.com
- The Unix Programmer's Manual,		...!sdcsvax!crash!elgar!ford
  2nd Edition, June, 1972.		ditto@cbmvax.commodore.com
Technical Details
Message-ID: <5797@cbmvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cbmvax!ditto
References: <0164.AA0164@julie>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cbmvax!ditto
From: ditto@cbmvax.UUCP (Michael "Ford" Ditto)
Newsgroups: comp.sys.amiga.tech
Subject: Re: memalign (can it be simulated?)
Summary: kinda-sorta
Keywords: AllocMem alignment
Message-ID: <5797@cbmvax.UUCP>
Date: 26 Jan 89 00:51:08 GMT
References: <0164.AA0164@julie>
Reply-To: ditto@cbmvax.UUCP (Michael "Ford" Ditto)
Organization: Commodore Technology, West Chester, PA
Lines: 19