fcml  1.2.2
Typedefs | Functions
fcml_env.h File Reference

API for environment configuration. More...

#include "fcml_types.h"
Include dependency graph for fcml_env.h:

Go to the source code of this file.

Typedefs

typedef fcml_ptr(* fcml_fp_env_memory_alloc_handler) (fcml_usize size)
 Memory allocator handler function pointer declaration. More...
 
typedef fcml_ptr(* fcml_fp_env_memory_realloc_handler) (fcml_ptr ptr, fcml_usize size)
 Memory reallocator handler function pointer declaration. More...
 
typedef void(* fcml_fp_env_memory_free_handler) (fcml_ptr memory_block)
 Memory deallocator handler function pointer declaration. More...
 

Functions

LIB_EXPORT fcml_fp_env_memory_alloc_handler LIB_CALL fcml_fn_env_register_memory_alloc_handler (fcml_fp_env_memory_alloc_handler handler)
 Registers the new dedicated handler responsible for allocating memory for the sake of internal FCML implementation. More...
 
LIB_EXPORT fcml_fp_env_memory_realloc_handler LIB_CALL fcml_fn_env_register_memory_realloc_handler (fcml_fp_env_memory_realloc_handler handler)
 Registers the new dedicated handler responsible for reallocating memory for the sake of internal FCML implementation. More...
 
LIB_EXPORT fcml_fp_env_memory_free_handler LIB_CALL fcml_fn_env_register_memory_free_handler (fcml_fp_env_memory_free_handler handler)
 Registers the new dedicated handler responsible for deallocating the memory for the sake of internal FCML implementation. More...
 

Detailed Description

API for environment configuration.

Typedef Documentation

◆ fcml_fp_env_memory_alloc_handler

typedef fcml_ptr(* fcml_fp_env_memory_alloc_handler) (fcml_usize size)

Memory allocator handler function pointer declaration.

Memory allocation handlers are used to allocate requested memory in environment specific way.

Parameters
sizeSize of the memory to allocate.
Returns
The allocated memory block or NULL in case of out of memory.

◆ fcml_fp_env_memory_free_handler

typedef void(* fcml_fp_env_memory_free_handler) (fcml_ptr memory_block)

Memory deallocator handler function pointer declaration.

Memory deallocation handlers are used to free requested memory blocks in environment specific way.

Parameters
memory_blockThe memory block to free.

◆ fcml_fp_env_memory_realloc_handler

typedef fcml_ptr(* fcml_fp_env_memory_realloc_handler) (fcml_ptr ptr, fcml_usize size)

Memory reallocator handler function pointer declaration.

Memory reallocation handlers are used to reallocate requested memory in environment specific way.

Parameters
ptrThe memory block to be reallocated.
sizeSize of the memory to allocate.
Returns
The reallocated memory block or NULL in case of out of memory.

Function Documentation

◆ fcml_fn_env_register_memory_alloc_handler()

LIB_EXPORT fcml_fp_env_memory_alloc_handler LIB_CALL fcml_fn_env_register_memory_alloc_handler ( fcml_fp_env_memory_alloc_handler  handler)

Registers the new dedicated handler responsible for allocating memory for the sake of internal FCML implementation.

Parameters
handlerNew memory allocation handler.
Returns
The replaced memory handler.

◆ fcml_fn_env_register_memory_free_handler()

LIB_EXPORT fcml_fp_env_memory_free_handler LIB_CALL fcml_fn_env_register_memory_free_handler ( fcml_fp_env_memory_free_handler  handler)

Registers the new dedicated handler responsible for deallocating the memory for the sake of internal FCML implementation.

Parameters
handlerNew memory deallocation handler.
Returns
The replaced memory handler.

◆ fcml_fn_env_register_memory_realloc_handler()

LIB_EXPORT fcml_fp_env_memory_realloc_handler LIB_CALL fcml_fn_env_register_memory_realloc_handler ( fcml_fp_env_memory_realloc_handler  handler)

Registers the new dedicated handler responsible for reallocating memory for the sake of internal FCML implementation.

Parameters
handlerNew memory reallocation handler.
Returns
The replaced memory handler.