int allocHost(int size)
A bufferID for the allocated memory block, or NULL if the memory couldn't be allocated (or the host program doesn't support allocated memory blocks).
Allocates a block of memory through the host application. Since some graphics programs like Photoshop manage memory and allocate large chunks of memory for themselves, you might want to use this in preference to the system memory functions like malloc and calloc.
int bufferID = allocHost(100); if (bufferID == NULL) { Warn("Could not allocate memory"); } else { char* memptr = lockHost(bufferID); sprintf(memptr, "Message goes here!"); Info(memptr); freeHost(bufferID); }