Allocators are used to allocate and free buffers for interfaces and adapters.
More...
|
#define | EWF_ALLOCATOR_STRUCT_MAGIC (0xA110CA70) /* ~~ allocato(r) */ |
|
#define | EWF_ALLOCATOR_STRUCT_SIZE (sizeof(struct _ewf_allocator)) |
|
#define | EWF_ALLOCATOR_VERSION (EWF_DEVELOPER_MICROSOFT | 0x0001) |
|
#define | EWF_ALLOCATOR_VALIDATE_POINTER(allocator_ptr) |
|
#define | EWF_ALLOCATOR_VALIDATE_POINTER_TYPE(allocator_ptr, allocator_type) |
|
Allocators are used to allocate and free buffers for interfaces and adapters.
◆ EWF_ALLOCATOR_VALIDATE_POINTER
#define EWF_ALLOCATOR_VALIDATE_POINTER |
( |
|
allocator_ptr | ) |
|
Value:do { \
if ((allocator_ptr == NULL) || \
(allocator_ptr->implementation_ptr == NULL)) \
{ \
EWF_LOG_ERROR("The allocator pointer is invalid."); \
} \
} while(0)
@ EWF_RESULT_INVALID_FUNCTION_ARGUMENT
Definition: ewf.h:69
◆ ewf_allocator_allocate()
Allocate a block from the allocator.
- Parameters
-
[in] | allocator_ptr | a pointer to an allocator control block |
[in,out] | p | address of a pointer to receive a pointer to the allocated block |
- Returns
- ewf_result success and error conditions
◆ ewf_allocator_release()
Release a block back to the allocator.
- Parameters
-
[in] | allocator_ptr | a pointer to an allocator control block |
| p[in] | a pointer to the block to be released |
- Returns
- ewf_result success and error conditions
◆ ewf_allocator_start()
Start the allocator.
- Parameters
-
[in] | allocator_ptr | a pointer to an allocator control block |
- Returns
- ewf_result success and error conditions
◆ ewf_allocator_stop()
Stop the allocator.
- Parameters
-
[in] | allocator_ptr | a pointer to an allocator control block |
- Returns
- ewf_result success and error conditions