OPTIGA™ Trust M
Host Library Documentation
optiga/include/optiga/pal/pal_os_memory.h File Reference

This file provides the prototype declarations of PAL OS MEMORY. More...

#include "pal.h"
Include dependency graph for optiga/include/optiga/pal/pal_os_memory.h:

Go to the source code of this file.

Functions

LIBRARY_EXPORTS void * pal_os_malloc (uint32_t block_size)
 Allocates a block of memory specified by the block size and return the pointer to it. More...
 
LIBRARY_EXPORTS void * pal_os_calloc (uint32_t number_of_blocks, uint32_t block_size)
 Allocates a block of memory specified by the block size and return the pointer to it. More...
 
LIBRARY_EXPORTS void pal_os_free (void *block)
 Frees the block of memory specified by the block pointer. More...
 
LIBRARY_EXPORTS void pal_os_memcpy (void *p_destination, const void *p_source, uint32_t size)
 Copies data from source to destination. More...
 
LIBRARY_EXPORTS void pal_os_memset (void *p_buffer, uint32_t value, uint32_t size)
 Sets the buffer with the given value. More...
 

Detailed Description

This file provides the prototype declarations of PAL OS MEMORY.

Author
Infineon Technologies AG

Definition in file optiga/include/optiga/pal/pal_os_memory.h.

Function Documentation

◆ pal_os_calloc()

LIBRARY_EXPORTS void* pal_os_calloc ( uint32_t  number_of_blocks,
uint32_t  block_size 
)

Allocates a block of memory specified by the block size and return the pointer to it.


  • Allocates a block of memory specified by the block size and return the pointer to it
Precondition
  • None
Note
  • None
Parameters
[in]number_of_blocksNumber of block to allocate
[in]block_sizeSize of the block
Return values
BlockPointer Memory allocation is successful
NULLMemory allocation is not successful

◆ pal_os_free()

LIBRARY_EXPORTS void pal_os_free ( void *  block)

Frees the block of memory specified by the block pointer.


  • Frees the block of memory specified by the block pointer
Precondition
  • None
Note
  • None
Parameters
[in]blockPointer to memory block to be freed

◆ pal_os_malloc()

LIBRARY_EXPORTS void* pal_os_malloc ( uint32_t  block_size)

Allocates a block of memory specified by the block size and return the pointer to it.


  • Allocates a block of memory specified by the block size and return the pointer to it
Precondition
  • None
Note
  • None
Parameters
[in]block_sizeSize of the block
Return values
BlockPointer Memory allocation is successful
NULLMemory allocation is not successful

◆ pal_os_memcpy()

LIBRARY_EXPORTS void pal_os_memcpy ( void *  p_destination,
const void *  p_source,
uint32_t  size 
)

Copies data from source to destination.


  • Copies data from source to destination
Precondition
  • None
Note
  • None
Parameters
[in]p_destinationSource to copy the data from
[in]p_sourceDestination to copy the data to
[in]sizeSize of the data to copy

◆ pal_os_memset()

LIBRARY_EXPORTS void pal_os_memset ( void *  p_buffer,
uint32_t  value,
uint32_t  size 
)

Sets the buffer with the given value.


  • Sets the buffer with the given value
Precondition
  • None
Note
  • None
Parameters
[in]p_bufferPointer to buffer
[in]valueValue to be set in the buffer
[in]sizeSize of the buffer