STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
heap_4.c File Reference
#include <stdlib.h>
#include <string.h>
#include "FreeRTOS.h"
#include "task.h"
Include dependency graph for heap_4.c:

Go to the source code of this file.

Classes

Macros

#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
#define configHEAP_CLEAR_MEMORY_ON_FREE   0
#define heapMINIMUM_BLOCK_SIZE   ( ( size_t ) ( xHeapStructSize << 1 ) )
#define heapBITS_PER_BYTE   ( ( size_t ) 8 )
#define heapSIZE_MAX   ( ~( ( size_t ) 0 ) )
#define heapMULTIPLY_WILL_OVERFLOW(a, b)
#define heapADD_WILL_OVERFLOW(a, b)
#define heapBLOCK_ALLOCATED_BITMASK   ( ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 ) )
#define heapBLOCK_SIZE_IS_VALID(xBlockSize)
#define heapBLOCK_IS_ALLOCATED(pxBlock)
#define heapALLOCATE_BLOCK(pxBlock)
#define heapFREE_BLOCK(pxBlock)

Typedefs

typedef struct A_BLOCK_LINK BlockLink_t

Functions

static void prvInsertBlockIntoFreeList (BlockLink_t *pxBlockToInsert) PRIVILEGED_FUNCTION
static void prvHeapInit (void)
void vPortFree (void *pv)
size_t xPortGetFreeHeapSize (void)
size_t xPortGetMinimumEverFreeHeapSize (void)
void vPortInitialiseBlocks (void)
void * pvPortCalloc (size_t xNum, size_t xSize)
void vPortGetHeapStats (HeapStats_t *pxHeapStats)

Variables

static PRIVILEGED_DATA uint8_t ucHeap [configTOTAL_HEAP_SIZE]

Macro Definition Documentation

◆ configHEAP_CLEAR_MEMORY_ON_FREE

#define configHEAP_CLEAR_MEMORY_ON_FREE   0

Definition at line 55 of file heap_4.c.

◆ heapADD_WILL_OVERFLOW

#define heapADD_WILL_OVERFLOW ( a,
b )
Value:
( ( a ) > ( heapSIZE_MAX - ( b ) ) )
#define heapSIZE_MAX
Definition heap_4.c:65
*brief create JSON pointer *sa reference_tokens const string_t const string_t & b
Definition json.hpp:13878
*brief create JSON pointer *sa reference_tokens const string_t & a
Definition json.hpp:13877

Definition at line 71 of file heap_4.c.

Referenced by prvHeapInit().

◆ heapALLOCATE_BLOCK

#define heapALLOCATE_BLOCK ( pxBlock)
Value:
( ( pxBlock->xBlockSize ) |= heapBLOCK_ALLOCATED_BITMASK )
#define heapBLOCK_ALLOCATED_BITMASK
Definition heap_4.c:77

Definition at line 80 of file heap_4.c.

Referenced by prvHeapInit().

◆ heapBITS_PER_BYTE

#define heapBITS_PER_BYTE   ( ( size_t ) 8 )

Definition at line 62 of file heap_4.c.

◆ heapBLOCK_ALLOCATED_BITMASK

#define heapBLOCK_ALLOCATED_BITMASK   ( ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 ) )

Definition at line 77 of file heap_4.c.

◆ heapBLOCK_IS_ALLOCATED

#define heapBLOCK_IS_ALLOCATED ( pxBlock)
Value:
( ( ( pxBlock->xBlockSize ) & heapBLOCK_ALLOCATED_BITMASK ) != 0 )

Definition at line 79 of file heap_4.c.

Referenced by vPortFree().

◆ heapBLOCK_SIZE_IS_VALID

#define heapBLOCK_SIZE_IS_VALID ( xBlockSize)
Value:
( ( ( xBlockSize ) & heapBLOCK_ALLOCATED_BITMASK ) == 0 )

Definition at line 78 of file heap_4.c.

Referenced by prvHeapInit().

◆ heapFREE_BLOCK

#define heapFREE_BLOCK ( pxBlock)
Value:
( ( pxBlock->xBlockSize ) &= ~heapBLOCK_ALLOCATED_BITMASK )

Definition at line 81 of file heap_4.c.

Referenced by vPortFree().

◆ heapMINIMUM_BLOCK_SIZE

#define heapMINIMUM_BLOCK_SIZE   ( ( size_t ) ( xHeapStructSize << 1 ) )

Definition at line 59 of file heap_4.c.

Referenced by prvHeapInit().

◆ heapMULTIPLY_WILL_OVERFLOW

#define heapMULTIPLY_WILL_OVERFLOW ( a,
b )
Value:
( ( ( a ) > 0 ) && ( ( b ) > ( heapSIZE_MAX / ( a ) ) ) )

Definition at line 68 of file heap_4.c.

Referenced by pvPortCalloc().

◆ heapSIZE_MAX

#define heapSIZE_MAX   ( ~( ( size_t ) 0 ) )

Definition at line 65 of file heap_4.c.

◆ MPU_WRAPPERS_INCLUDED_FROM_API_FILE

#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE

Definition at line 43 of file heap_4.c.

Typedef Documentation

◆ BlockLink_t

typedef struct A_BLOCK_LINK BlockLink_t

Function Documentation

◆ prvHeapInit()

◆ prvInsertBlockIntoFreeList()

void prvInsertBlockIntoFreeList ( BlockLink_t * pxBlockToInsert)
static

Definition at line 442 of file heap_4.c.

References mtCOVERAGE_TEST_MARKER, A_BLOCK_LINK::pxNextFreeBlock, and A_BLOCK_LINK::xBlockSize.

Referenced by prvHeapInit(), and vPortFree().

◆ pvPortCalloc()

void * pvPortCalloc ( size_t xNum,
size_t xSize )

Definition at line 378 of file heap_4.c.

References heapMULTIPLY_WILL_OVERFLOW, NULL, and pvPortMalloc().

◆ vPortFree()

◆ vPortGetHeapStats()

◆ vPortInitialiseBlocks()

void vPortInitialiseBlocks ( void )

Definition at line 372 of file heap_4.c.

◆ xPortGetFreeHeapSize()

size_t xPortGetFreeHeapSize ( void )

Definition at line 360 of file heap_4.c.

◆ xPortGetMinimumEverFreeHeapSize()

size_t xPortGetMinimumEverFreeHeapSize ( void )

Definition at line 366 of file heap_4.c.

Variable Documentation

◆ ucHeap

PRIVILEGED_DATA uint8_t ucHeap[configTOTAL_HEAP_SIZE]
static

Definition at line 92 of file heap_4.c.