|
vgl 1.0.0
Virtual Globe Library: API reference
|
#include <vgl/foundation.h>
Public Attributes | |
| uint32_t | version |
| uint32_t | reserved |
| void * | user_data |
| void *(* | allocate )(void *user_data, size_t size, size_t alignment) |
| void(* | deallocate )(void *user_data, void *memory, size_t size, size_t alignment) |
Host allocator. Every allocation made on behalf of a context goes through it (NFR-03). Must be thread-safe if a task callback is installed, or if the host completes I/O requests on threads other than the one that calls into the context.
| uint32_t vgl_allocator_interface::version |
VGL_ALLOCATOR_INTERFACE_VERSION
| uint32_t vgl_allocator_interface::reserved |
| void* vgl_allocator_interface::user_data |
| void *(* vgl_allocator_interface::allocate) (void *user_data, size_t size, size_t alignment) |
Allocates size bytes aligned to alignment, a power of two. Returns null on failure. size is never 0.
Thread safety: any thread.
| void(* vgl_allocator_interface::deallocate) (void *user_data, void *memory, size_t size, size_t alignment) |
Frees memory returned by allocate, with the same size and alignment. memory is never null.
Thread safety: any thread.