MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_hw_sram_init

Function rt_hw_sram_init

bsp/simulator/drivers/board.c:23–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21 */
22
23rt_uint8_t *rt_hw_sram_init(void)
24{
25 rt_uint8_t *heap;
26 heap = (rt_uint8_t *)malloc(RT_HEAP_SIZE);
27 if (heap == RT_NULL)
28 {
29 rt_kprintf("there is no memory in pc.");
30#ifdef _WIN32
31 _exit(1);
32#else
33 exit(1);
34#endif
35 }
36#ifdef RT_USING_HEAP
37 /* init memory system */
38 rt_system_heap_init((void*)heap, (void*)&heap[RT_HEAP_SIZE - 1]);
39#endif
40 return heap;
41}
42
43#ifdef _WIN32
44#include <windows.h>

Callers 1

rt_hw_board_initFunction · 0.70

Calls 4

rt_kprintfFunction · 0.85
rt_system_heap_initFunction · 0.85
mallocFunction · 0.50
_exitFunction · 0.50

Tested by

no test coverage detected