Typedef NVCVMemAllocFunc

Typedef Documentation

typedef void *(*NVCVMemAllocFunc)(void *ctx, int64_t sizeBytes, int32_t alignBytes)

Function type for memory resource allocation.

Param ctx:

[in] Pointer to user context.

Param sizeBytes:

[in] How many bytes to allocate. It’s guaranteed that >= 0 and it’s an integral multiple of alignBytes.

Param alignBytes:

[in] Address alignment in bytes. It’s guaranteed to be a power of two. The returned address will be multiple of this value.

Return:

Pointer to allocated memory buffer. Must return NULL if buffer cannot be allocated.