lwmem/docs/examples_src/example_regions_definitions.c

19 lines
459 B
C
Raw Normal View History

2019-09-29 10:09:22 +02:00
#include "lwmem/lwmem.h"
/*
* \brief Define regions for memory manager
*/
static
lwmem_region_t regions[] = {
/* Set start address and size of each region */
{ (void *)0x10000000, 0x00001000 },
{ (void *)0xA0000000, 0x00008000 },
{ (void *)0xC0000000, 0x00008000 },
{ NULL, 0},
2019-09-29 10:09:22 +02:00
};
/* Later in the initialization process */
/* Assign regions for manager */
lwmem_assignmem(regions);
2020-02-02 18:57:59 +01:00
/* or */
lwmem_assignmem_ex(NULL, regions);