CompuServe Messages

#AllocMem quest.

    02-Feb-94 18:40:38
Sb: #39255-#AllocMem quest.
Fm: Peter Wade 100265,2740
To: New member 73016,27
Yes, AllocMem is what you want. Its in the Exec Library. Size and Mode are both long. If you have the Amiga include files (they come with Devpac) you can use the names as follows : MEMF_PUBLIC 1 Public Memory MEMF_CHIP 2 Chip Memory MEMF_FAST 4 Fast Memory MEMF_CLEAR $0100 Clear the Memory If you don't specify chip or fast it will give you either, fast if possible. You can add MEMF_PUBLIC and/or MEMF_CLEAR to your selection. Memory which is passed to system calls or accessed by other tasks should be made public. To free the memory, use FreeMem giving the adress of the block in A1 and the size in bytes in D0, both long. There is another way of doing this using AllocRemember/FreeRemember in the Intuition Library. This lets you do more than one block in one go but its more complicated.