1
0
forked from me/IronOS

Adjust how heap and ram sections are allocated

This commit is contained in:
Ben V. Brown
2023-05-09 22:10:28 +10:00
parent f1e2bf975b
commit df693773f1
4 changed files with 47 additions and 45 deletions

View File

@@ -19,10 +19,11 @@ uint16_t ADCReadings[ADC_NORM_SAMPLES]; // room for 32 lots of the pair of readi
// Heap
extern uint8_t _heap_start;
extern uint8_t _heap_size; // @suppress("Type cannot be resolved")
extern uint8_t __HeapBase;
extern uint8_t __HeapLimit; // @suppress("Type cannot be resolved")
const uint32_t _heap_size = ((&__HeapLimit) - (&__HeapBase));
static HeapRegion_t xHeapRegions[] = {
{&_heap_start, (unsigned int)&_heap_size},
{&__HeapBase, (unsigned int)_heap_size},
{NULL, 0}, /* Terminates the array. */
{NULL, 0} /* Terminates the array. */
};