RDK Documentation (Open Sourced RDK Components)
AampMemoryUtils.h File Reference

Header file of helper functions for memory management. More...

#include <stddef.h>
Include dependency graph for AampMemoryUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GrowableBuffer
 Structure of GrowableBuffer. More...
 

Functions

void aamp_Free (void *ptr)
 wrapper for g_free, used for segment allocation
 
void aamp_Free (struct GrowableBuffer *buffer)
 free "GrowableBuffer" memopry allocated by aamp_Malloc
 
void * aamp_Realloc (void *ptr, size_t numBytes)
 
void * aamp_Malloc (size_t numBytes)
 wrapper for g_malloc, used for segment allocation
 
void aamp_TransferMemory (void *ptr)
 called when ownership of memory of injected fragments passed to gstreamer
 
void aamp_Malloc (struct GrowableBuffer *buffer, size_t len)
 Allocate memory to growable buffer. More...
 
void aamp_AppendBytes (struct GrowableBuffer *buffer, const void *ptr, size_t len)
 append data to GrowableBuffer ADT
 
void aamp_MoveBytes (struct GrowableBuffer *buffer, const void *ptr, size_t len)
 Move data to buffer.
 
void aamp_AppendNulTerminator (struct GrowableBuffer *buffer)
 Append nul character to buffer.
 

yes

Header file of helper functions for memory management.

Definition in file AampMemoryUtils.h.


Data Structure Documentation

◆ GrowableBuffer

struct GrowableBuffer

Structure of GrowableBuffer.

Definition at line 39 of file AampMemoryUtils.h.

Collaboration diagram for GrowableBuffer:
Collaboration graph
Data Fields
char * ptr

Pointer to buffer's memory location

size_t len

Buffer size

size_t avail

Available buffer size

Function Documentation

◆ aamp_Malloc()

void aamp_Malloc ( struct GrowableBuffer buffer,
size_t  len 
)

Allocate memory to growable buffer.

Parameters
buffergrowable buffer
lensize of memory to be allocated

Definition at line 46 of file FakeAampMemoryUtils.cpp.