void *malloc_from_CAVE_memory(size_t size) { #if defined(__irix) // Allocate memory from our shared memory arena if (shared_CAVE_memory_arena == NULL) { // this should be fun. msgErr << "Shared CAVE memory not allocated. Prepare to crash and burn." << sendmsg; return NULL; } else { // get memory from the CAVE shared memory arena return amalloc(size, shared_CAVE_memory_arena); } #else // Allocate from shared CAVE pool void *retval = CAVEMalloc(size); if (!retval) // this should be fun. msgErr << "Not enough shared CAVE memory. Prepare to crash and burn." << sendmsg; return retval; #endif }
void *vrlib_shmem_alloc (size_t size) { return CAVEMalloc (size); }