OPTIGA Trust M  1.1.0
C++ library for Optiga Trust M Chip Security Controller
pal_os_memory.h File Reference

This file defines the memory management related macros. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define pal_os_malloc(block_size)   malloc(block_size)
 Allocates a block of memory. More...
 
#define pal_os_calloc(no_of_blocks, block_size)   calloc(no_of_blocks, block_size)
 Allocates a block of memory and clean the contents. More...
 
#define pal_os_free(p_block)   free(p_block)
 Free's a block of allocated memory. More...
 
#define pal_os_memcpy(p_destination, p_source, size)   memcpy(p_destination, p_source, size)
 Copies the data from source to destination. More...
 
#define pal_os_memset(p_buffer, value, size)   memset(p_buffer, value, size)
 Sets the memory buffer to the data supplied. More...
 

Detailed Description

This file defines the memory management related macros.

Copyright (c) 2019 Infineon Technologies AG

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

\endcopyright

Author
Infineon Technologies AG

Macro Definition Documentation

◆ pal_os_calloc

#define pal_os_calloc (   no_of_blocks,
  block_size 
)    calloc(no_of_blocks, block_size)

Allocates a block of memory and clean the contents.

Allocates a block of memory and clean the contents.

Precondition
  • None
Note
  • None
Parameters
[in]no_of_blocksNumber of blocks to be allocated
[in]block_sizeSize of memory block to be allocated

◆ pal_os_free

#define pal_os_free (   p_block)    free(p_block)

Free's a block of allocated memory.

Free's a block of allocated memory.

Precondition
  • None
Note
  • None
Parameters
[in]p_blockPointer to the memory block to be freed

◆ pal_os_malloc

#define pal_os_malloc (   block_size)    malloc(block_size)

Allocates a block of memory.

Allocates a block of memory.

Precondition
  • None
Note
  • None
Parameters
[in]block_sizeSize of memory block to be allocated

◆ pal_os_memcpy

#define pal_os_memcpy (   p_destination,
  p_source,
  size 
)    memcpy(p_destination, p_source, size)

Copies the data from source to destination.

Copies the data from source to destination.

Precondition
  • None
Note
  • None
Parameters
[in]p_destinationPointer to destination buffer
[in]p_sourcePointer to source buffer
[in]sizeSize in bytes to be copied

◆ pal_os_memset

#define pal_os_memset (   p_buffer,
  value,
  size 
)    memset(p_buffer, value, size)

Sets the memory buffer to the data supplied.

Sets the memory buffer with the specified size to the data supplied.

Precondition
  • None
Note
  • None
Parameters
[in]p_bufferPointer to buffer
[in]valueValue to be written in the buffer
[in]sizeSize in bytes to be written with the specified value