lwmem/docs/examples_src/example_realloc_region.c

19 lines
490 B
C
Raw Normal View History

2019-09-29 10:09:22 +02:00
#include "lwmem/lwmem.h"
/* Define one region used by lwmem */
static unsigned char region_mem[128];
/*
* \brief Define regions for memory manager
*/
static
lwmem_region_t regions[] = {
/* Set start address and size of each region */
2021-12-17 07:30:34 +01:00
{ region_mem, sizeof(region_mem) },
{ NULL, 0 }
2019-09-29 10:09:22 +02:00
};
/* Later in the initialization process */
/* Assign regions for manager */
lwmem_assignmem(regions);
2019-09-29 10:09:22 +02:00
lwmem_debug_free(); /* This is debug function for sake of this example */