Post by Robert HabkirkPost by David MisnerHow does RAM work on an Amiga? Is it different that RAM on Windows or Mac??
David
The ram works the same
The actual RAM *hardware* is quite different. Amiga used a couple of
technologies for RAMs, starting with simple dynamic RAM with row/column
addressing up to SDRAM on some accelerator boards. DDR and DDR2 Ram were
IIRC never used - they became established long after Amiga died away.
Difference is the amount of data transfered on a single cycle, how
memory is actually adressed and so on. DDR/DDR2 is actually quite
complicated.
It makes no (usually) difference for the software developer, but it is a
huge difference on the hardware side. It might make a difference if you
want to optimize for a specific machine - then you need take cache sizes
and (possibly) even RAM-locality into account.
Post by Robert Habkirkit is the operating system treats it differently
Amiga generally use un protected or reserved dynamic ram that is used
and released by programs and is not being managed directly by the OS.
Huh? Of course it is managed by the Os. AllocMem() and FreeMem() are the
two exec functions that allocate RAM and release it. Other systems use
malloc() and free(), but that's more or less the same. The only
difference on the Amiga is that the caller of AllocMem() is responsible
of keeping the size of the memory allocated, whereas the POSIX malloc()
does that transparently. AllocVec() and FreeVec() (on a higher level,
working on top of AllocMem() / FreeMem()) are the closest equivalent.
Post by Robert HabkirkOn
a Windows machine and Mac programs reserve and protect the ram it needs
and the memory is managed by the OS.
On most other operating systems, memory management is a two-step
process: The application heap is allocated from the Os in supervisor
mode page by page, and extended as required. From that heap applications
use user-mode code to dynamically allocate RAM, and go back to the Os
should the RAM on the heap run out. On the Amiga, only one (global) heap
exists from which all applications allocate, and - since it physical
addressing is used - no extension of the heap is possible. For the
Amiga, the MMU is (typically) not used to protect unallocated RAM, but
it *could* be used. Actually, MuGuardianAngel does exactly that (protect
unallocated RAM for debugging purposes).
Greetings,
Thomas