BSL v1.1.1 - 19.g31939de
AMMOS Bundle Protocol Security Library (BSL)
Loading...
Searching...
No Matches
BSLMemory.h File Reference

Memory management function declarations. More...

#include <stddef.h>
+ Include dependency graph for BSLMemory.h:
+ This graph shows which files directly or indirectly include this file:

Functions

void * BSL_malloc (size_t size)
 Dynamic memory allocation.
 
void * BSL_realloc (void *ptr, size_t size)
 Dynamic memory reallocation.
 
void * BSL_calloc (size_t nmemb, size_t size)
 Contiguous dynamic memory allocation.
 
void BSL_free (void *ptr)
 Free dynamically allocated memory.
 

Detailed Description

Memory management function declarations.

Function Documentation

◆ BSL_calloc()

◆ BSL_free()

void BSL_free ( void *  ptr)

Free dynamically allocated memory.

Note
This has the same signature as libc free().
Parameters
ptrpointer to memory to free. This pointer may be null, which is a do-nothing behavior.

References BSL_HostDescriptors_t::dyn_mem_desc, BSL_DynMemHostDescriptors_t::free_cb, and HostDescriptorTable.

Referenced by BSL_API_QuerySecurity(), BSL_Crypto_ClearGeneratedKeyHandle(), BSL_Crypto_UnwrapKey(), bsl_data_int_free(), bsl_mock_decode_canonical(), BSL_PrimaryBlock_deinit(), BSL_SecCtx_ExecutePolicyActionSet(), BSL_SeqReader_Destroy(), BSL_SeqWriter_Destroy(), BSL_TestUtils_InitMallocBIBActionSet(), BSL_TestUtils_ReadBTSD_Deinit(), BSL_TestUtils_WriteBTSD_Deinit(), BSLP_InitParams_Deinit(), BSLP_PolicyProvider_Destroy(), BSLP_QueryPolicy(), LLVMFuzzerTestOneInput(), mock_bpa_ctr_deinit(), mock_bpa_eidpat_deinit(), MockBPA_Agent_Deinit(), MockBPA_Agent_process(), MockBPA_Bundle_Deinit(), MockBPA_EID_Deinit(), MockBPA_ReadBTSD(), MockBPA_ReadBTSD_Deinit(), MockBPA_RemoveBlock(), MockBPA_WriteBTSD(), MockBPA_WriteBTSD_Deinit(), tearDown(), test_bsl_mock_encode_canonical(), TEST_CASE(), test_decrypt(), test_encrypt(), test_MultiplePolicyProviders(), test_RFC9173_AppendixA_Example1_BIB_Source(), test_RFC9173_AppendixA_Example2_BCB_Acceptor(), test_RFC9173_AppendixA_Example2_BCB_Source(), test_RFC9173_AppendixA_Example3_Acceptor(), test_RFC9173_AppendixA_Example3_Source(), test_RFC9173_AppendixA_Example4_Acceptor(), test_RFC9173_AppendixA_Example4_Source(), test_sec_accept_keyunwrap(), test_sec_source_keywrap(), test_SecurityContext_BIB_Acceptor(), test_SecurityContext_BIB_Source(), test_SecurityContext_BIB_Verifier(), test_SecurityContext_BIB_Verifier_Failure(), test_SeqWriter_flat(), and TestASBDecodeEncodeClosure().

◆ BSL_malloc()

void * BSL_malloc ( size_t  size)

◆ BSL_realloc()

void * BSL_realloc ( void *  ptr,
size_t  size 
)

Dynamic memory reallocation.

Note
This has the same signature as libc realloc().
Parameters
[in]ptrOptional existing dynamic memory pointer
sizenew allocation size
Returns
valid heap pointer or null if failed.

References BSL_HostDescriptors_t::dyn_mem_desc, HostDescriptorTable, and BSL_DynMemHostDescriptors_t::realloc_cb.

Referenced by BSL_Data_Resize(), and MockBPA_ReallocBTSD().