TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Frank Adam
from: Michael Stapleton
date: 1996-08-30 13:30:00
subject: Re: Memory blocks snuffe

-=> On 20 Aug 96  15:44:02 you wrote to me <=-

Hi Frank,

MS> You can't make many assumptions about how an OS handles memory.

FA> Yeah, oh well it was a good idea while it lasted.  Perhaps 4-5
FA> pages of #ifs would do it.:)

MS> It's still a good idea, and I don't think it'd take too many
MS> pages of #ifs to cover a large number of compilers & OSs.
MS> Still, it would be a nasty job for one person; I expect that it
MS> would be simpler if each section was written by someone who is
MS> expert in that compiler/OS.

FA> Damn, that leaves me right out of it.:)

Not really, your basic framework can still be used.

MS> Actually, (if memory serves me correctly) your routines wouldn't
MS> require much modification to work properly on the Amiga.  OTOH,
MS> I only use the malloc() family routines when I'm writing
MS> portable code, since I normally use the AmigaOS AllocMem()
MS> function for Amiga-specific programs.

FA> Borland does have allocmem() and it's highly portable too..  As
FA> long as you're on a DOS platform and in Borland :-)

Yeah, right.  :) I daresay allocmem() is a little different to
AllocMem().  I guess that allocmem() is your lowest level of memory
allocation.

FWIW, We need AllocMem() on the Amiga because we have two types of
memory, "CHIP" and "FAST".  CHIP memory is on the
motherboard & is
accessible by the CPU, the graphics coprocessor & the various DMA
devices (display, audio, disk, etc).  FAST memory is on the
expansion bus, and is only directly accessible by the CPU.

MS> FWIW, we also have a cute function called AllocEntry(), which
MS> allocates several blocks at once, using a linked list

FA> Don't have this one, i'm not really sure what that would be good
FA> for, multiple arrays perhaps ?

It lets you allocate all of a Task's memory in one go and it can be
automatically freed when the Task exits.

Michael Stapleton of Graphic Bits.

 * AmyBW v2.10 *
... This tagline is encrypted
--- AdeptXBBS v1.07f (Registered)
* Origin: Mach One BBS (3:713/615)
SEEN-BY: 50/99 620/243 623/630 711/401 409 410 413 430 808 809 932 934
SEEN-BY: 712/515 713/111 317 601 611 615 618 700 826 888 914 714/906 800/1
@PATH: 713/888 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.