memory.c File Reference

Memory module implementation file. More...

#include "memory.h"
#include <stdlib.h>
Include dependency graph for memory.c:

Go to the source code of this file.

Functions

void * mcl_memory_malloc (mcl_size_t size)
 
void * mcl_memory_calloc (mcl_size_t count, mcl_size_t bytes)
 
void * mcl_memory_realloc (void *p, mcl_size_t bytes)
 
void mcl_memory_free (void *p)
 

Detailed Description

Memory module implementation file.

This module implements mcl_core/mcl_memory.h interface with standard C library.

Definition in file memory.c.

Function Documentation

void* mcl_memory_calloc ( mcl_size_t  count,
mcl_size_t  bytes 
)

This function allocates memory and sets it to zero.

Parameters
countNumber of elements to be allocated. Total memory allocated will be (count*bytes)
bytesSize of each element in bytes.
Returns
Pointer to the allocated memory.

Definition at line 24 of file memory.c.

Referenced by mcl_http_client_initialize().

Here is the caller graph for this function:

void mcl_memory_free ( void *  p)

This function frees memory.

Parameters
pPointer 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().

Here is the caller graph for this function:

void* mcl_memory_malloc ( mcl_size_t  size)

This function allocates memory.

Parameters
sizeSize of the memory to be allocated in bytes.
Returns
Pointer to the allocated memory.

Definition at line 14 of file memory.c.

Referenced by _libcrypto_malloc(), json_util_initialize_json_library(), and mcl_http_client_initialize().

Here is the caller graph for this function:

void* mcl_memory_realloc ( void *  p,
mcl_size_t  bytes 
)

This function reallocates memory.

Parameters
pPointer to the memory to be reallocated.
bytesSize of the memory to be reallocated in bytes.
Returns
Pointer to the reallocated memory.

Definition at line 34 of file memory.c.

Referenced by _libcrypto_realloc(), and mcl_http_client_initialize().

Here is the caller graph for this function: