CALL "M$ALLOC" USING memSize memAddress |
memSize | any numeric data item or numeric literal | Specifies the number of bytes to be allocated. |
memAddress | USAGE POINTER | Receives the handle to the allocated memory. If the allocation fails the this item is set to NULL. Note - compile with the -cp option if you need to share the memory with external C routines. |
*> define mem1 and mem2 usage pointer call "m$alloc" using 8, mem1 call "m$alloc" using 8, mem2 call "m$put" using mem1, "Hello", 8, 1 call "m$put" using mem2, "World", 8, 1 |