Go to the source code of this file.
Frees memory allocated with ghost_cu_temp_buffer_malloc. Threadsafe.
- Parameters
-
- Returns
- GHOST_SUCCESS on success or an error indicator.
ghost_error ghost_cu_temp_buffer_malloc |
( |
void ** |
mem, |
|
|
size_t |
bytesize |
|
) |
| |
Useful for allocating small temporary buffers. Keeps a list of previously allocated and freed buffers, and returns one if the size fits. Threadsafe.
- Parameters
-
mem | Where to store the memory. |
bytesize | The number of bytes to allocate. |
- Returns
- GHOST_SUCCESS on success or an error indicator.