+/*-----------------------------------------------------------*/\r
+\r
+static void prvInitialiseHeap( void )\r
+{\r
+/* This demo uses heap_5.c, so start by defining some heap regions. This is\r
+only done to provide an example as this demo could easily create one large heap\r
+region instead of multiple smaller heap regions - in which case heap_4.c would\r
+be the more appropriate choice. No initialisation is required when heap_4.c is\r
+used. The xHeapRegions structure requires the regions to be defined in order,\r
+so this just creates one big array, then populates the structure with offsets\r
+into the array - with gaps in between and messy alignment just for test\r
+purposes. */\r
+static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];\r
+volatile uint32_t ulAdditionalOffset = 19; /* Just to prevent 'condition is always true' warnings in configASSERT(). */\r
+const HeapRegion_t xHeapRegions[] =\r
+{\r
+ /* Start address with dummy offsets Size */\r
+ { ucHeap + 1, mainREGION_1_SIZE },\r
+ { ucHeap + 15 + mainREGION_1_SIZE, mainREGION_2_SIZE },\r
+ { ucHeap + 19 + mainREGION_1_SIZE + mainREGION_2_SIZE, mainREGION_3_SIZE },\r
+ { NULL, 0 }\r
+};\r
+\r
+ /* Sanity check that the sizes and offsets defined actually fit into the\r
+ array. */\r
+ configASSERT( ( ulAdditionalOffset + mainREGION_1_SIZE + mainREGION_2_SIZE + mainREGION_3_SIZE ) < configTOTAL_HEAP_SIZE );\r
+\r
+ vPortDefineHeapRegions( xHeapRegions );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r