Memory module interface header file. More...
#include "mcl_core/mcl_core_common.h"
Go to the source code of this file.
Macros | |
#define | MCL_MALLOC(bytes) mcl_memory_malloc(bytes) |
#define | MCL_NEW(p) ((p) = MCL_MALLOC((long)sizeof (*p))) |
#define | MCL_CALLOC(count, bytes) mcl_memory_calloc(count, bytes) |
#define | MCL_NEW_WITH_ZERO(p) ((p) = MCL_CALLOC(1, (long)sizeof *(p))) |
#define | MCL_RESIZE(p, bytes) ((p) = mcl_memory_realloc(p, bytes)) |
#define | MCL_FREE(p) ((void)(mcl_memory_free(p), (p) = NULL)) |
Functions | |
MCL_CORE_EXPORT void * | mcl_memory_malloc (mcl_size_t size) |
MCL_CORE_EXPORT void * | mcl_memory_calloc (mcl_size_t count, mcl_size_t bytes) |
MCL_CORE_EXPORT void * | mcl_memory_realloc (void *p, mcl_size_t bytes) |
MCL_CORE_EXPORT void | mcl_memory_free (void *p) |
Memory module interface header file.
This module contains functions and macro definitions for memory allocation/deallocation operations.
Definition in file mcl_memory.h.
#define MCL_CALLOC | ( | count, | |
bytes | |||
) | mcl_memory_calloc(count, bytes) |
Definition at line 56 of file mcl_memory.h.
Referenced by mcl_core_get_last_access_token(), mcl_core_get_last_token_time(), mcl_http_response_get_header(), and security_hash_sha256().
#define MCL_FREE | ( | p | ) | ((void)(mcl_memory_free(p), (p) = NULL)) |
Definition at line 59 of file mcl_memory.h.
Referenced by _add_jwks(), _base64_encode_big_number(), _calculate_signature(), _certificate_list_destroy_callback(), _compose_access_token_request_payload(), _compose_rsa_key_rotation_json(), _compose_rsa_onboarding_json(), _create_self_issued_jwt_payload(), _decode_with_table(), _free_string(), _generate_correlation_id_string(), _generate_token(), _get_header_and_payload_encoded_base64_url(), _get_rsa_private_key(), _get_rsa_public_key(), _header_list_destroy_callback(), _http_request_header_destroy(), _join_with_dot(), _process_registration_response_rsa_3072(), _process_registration_response_shared_secret(), _response_header_callback(), core_processor_destroy(), core_processor_get_access_token(), core_processor_register(), core_processor_update_credentials(), get_chunked_response(), get_content_length_response(), get_response(), header_list_destroy_callback(), hmac_sha256(), jwt_destroy(), jwt_get_token(), mcl_core_configuration_destroy(), mcl_core_configuration_set_parameter(), mcl_core_destroy(), mcl_http_client_destroy(), mcl_http_client_send(), mcl_http_request_add_header(), mcl_http_request_destroy(), mcl_http_response_destroy(), mcl_list_destroy_with_content(), mcl_list_remove(), mcl_tls_ca_chain_destroy(), mcl_tls_socket_destroy(), random_generate_guid(), security_generate_rsa_key(), security_handler_destroy(), security_rsa_get_modulus_and_exponent(), security_rsa_sign(), start_http(), and string_util_reset().
#define MCL_MALLOC | ( | bytes | ) | mcl_memory_malloc(bytes) |
Definition at line 54 of file mcl_memory.h.
Referenced by _base64_encode_big_number(), _decode_with_table(), _encode_with_table(), _generate_correlation_id_string(), _get_rsa_private_key(), _get_rsa_public_key(), _join_with_dot(), _response_header_callback(), _response_payload_callback(), core_processor_register(), get_chunked_response(), get_content_length_response(), get_response(), hmac_sha256(), json_util_get_string(), mcl_core_configuration_set_parameter(), mcl_http_client_initialize(), mcl_http_request_add_header(), mcl_tls_ca_chain_init(), mcl_tls_socket_init(), random_generate_guid(), security_rsa_sign(), start_http(), string_util_concatenate(), and string_util_strdup().
#define MCL_NEW | ( | p | ) | ((p) = MCL_MALLOC((long)sizeof (*p))) |
Definition at line 55 of file mcl_memory.h.
Referenced by core_processor_initialize(), jwt_initialize(), mcl_core_configuration_initialize(), mcl_core_initialize(), mcl_http_client_add_certificate(), mcl_http_client_initialize(), mcl_http_client_send(), mcl_http_request_initialize(), mcl_http_response_initialize(), mcl_list_add(), mcl_list_initialize(), and security_handler_initialize().
#define MCL_NEW_WITH_ZERO | ( | p | ) | ((p) = MCL_CALLOC(1, (long)sizeof *(p))) |
Definition at line 57 of file mcl_memory.h.
#define MCL_RESIZE | ( | p, | |
bytes | |||
) | ((p) = mcl_memory_realloc(p, bytes)) |
Definition at line 58 of file mcl_memory.h.
Referenced by _response_payload_callback(), and get_chunked_response().
MCL_CORE_EXPORT void* mcl_memory_calloc | ( | mcl_size_t | count, |
mcl_size_t | bytes | ||
) |
This function allocates memory and sets it to zero.
count | Number of elements to be allocated. Total memory allocated will be (count* |
bytes | Size of each element in bytes. |
Definition at line 24 of file memory.c.
Referenced by mcl_http_client_initialize().
MCL_CORE_EXPORT void mcl_memory_free | ( | void * | p | ) |
This function frees memory.
p | Pointer to the memory to be freed. |
Definition at line 45 of file memory.c.
Referenced by _libcrypto_free(), json_util_initialize_json_library(), and mcl_http_client_initialize().
MCL_CORE_EXPORT void* mcl_memory_malloc | ( | mcl_size_t | size | ) |
This function allocates memory.
size | Size of the memory to be allocated in bytes. |
Definition at line 14 of file memory.c.
Referenced by _libcrypto_malloc(), json_util_initialize_json_library(), and mcl_http_client_initialize().
MCL_CORE_EXPORT void* mcl_memory_realloc | ( | void * | p, |
mcl_size_t | bytes | ||
) |
This function reallocates memory.
p | Pointer to the memory to be reallocated. |
bytes | Size of the memory to be reallocated in bytes. |
Definition at line 34 of file memory.c.
Referenced by _libcrypto_realloc(), and mcl_http_client_initialize().