NVIDIA DRIVE OS Linux API Reference

5.1.0.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Detailed Description

Defines Trusted Little Kernel (TLK) memory allocation services functions.

Functions

void * te_mem_alloc (uint32_t size)
 Allocates memory of specified size. More...
 
void * te_mem_calloc (uint32_t size)
 Allocates and clears memory of specified size. More...
 
void * te_mem_realloc (void *buffer, uint32_t size)
 Changes size of memory by specified amount. More...
 
void te_mem_free (void *buffer)
 Frees the specified memory. More...
 
void te_mem_fill (void *buffer, uint32_t value, uint32_t size)
 Fills specified memory range with specified value. More...
 
void te_mem_move (void *dest, const void *src, uint32_t size)
 Moves specified number of bytes from a source memory range to a destination memory range. More...
 
int te_mem_compare (const void *buffer1, const void *buffer2, uint32_t size)
 Compares two ranges of memory for equality. More...
 

Function Documentation

void* te_mem_alloc ( uint32_t  size)

Allocates memory of specified size.

Parameters
[in]sizeSize in bytes of desired memory.
Returns
A non-NULL pointer to the requested memory or NULL if the request to allocate memory failed.
void* te_mem_calloc ( uint32_t  size)

Allocates and clears memory of specified size.

Parameters
[in]sizeSize in bytes of desired memory.
Returns
A non-NULL pointer to the requested memory or NULL if the request to allocate and clear memory failed.
int te_mem_compare ( const void *  buffer1,
const void *  buffer2,
uint32_t  size 
)

Compares two ranges of memory for equality.

Parameters
[in]buffer1A pointer to first memory range to compare.
[in]buffer2A pointer to second memory range to compare.
[in]sizeNumber of bytes to compare.
Returns
An integer where:
  • 0 indicates the contents of the first memory range match match the contents of the second memory range.
  • < 0 indicates the contents of the first memory range are less than the contents of the second memory range.
  • > 0 indicates the contents of the first memory range are greater than the contents of the second memory range.
void te_mem_fill ( void *  buffer,
uint32_t  value,
uint32_t  size 
)

Fills specified memory range with specified value.

Parameters
[in]bufferA pointer to memory to fill.
[in]valueValue to use for fill operation.
[in]sizeNumber of bytes to fill.
void te_mem_free ( void *  buffer)

Frees the specified memory.

Parameters
[in]bufferA pointer to memory to free.
void te_mem_move ( void *  dest,
const void *  src,
uint32_t  size 
)

Moves specified number of bytes from a source memory range to a destination memory range.

Note
The two memory ranges may overlap.
Parameters
[out]destA pointer to destination buffer for move operation.
[in]srcA pointer to source buffer for move operation.
[in]sizeNumber of bytes to move.
void* te_mem_realloc ( void *  buffer,
uint32_t  size 
)

Changes size of memory by specified amount.

Parameters
[in]bufferPointer to memory block to resize.
[in]sizeNew size in bytes of memory block.
Returns
A non-NULL pointer to the newly resized memory or NULL if the request to resize failed.