.
common/dlmalloc.c
1 int initf_malloc(void)
2 {
3 #ifdef CONFIG_SYS_MALLOC_F_LEN
4 assert(gd->malloc_base); /* Set up by crt0.S */
5 gd->malloc_limit = CONFIG_SYS_MALLOC_F_LEN;
6 gd->malloc_ptr = 0;
7 #endif
8
9 return 0;
10 }
- 3번 줄의
CONFIG_SYS_MALLOC_F_LEN
은 0x2000로 정의되어 있습니다. - 4번 줄은
({ if (!(gd->malloc_base) && 0) __assert_fail("gd->malloc_base", "common/dlmalloc.c", 2379, __func__); });
로 치환되어 수행됩니다. - 5번 줄의
CONFIG_SYS_MALLOC_F_LEN
은include/generated/autoconf.h
에0x2000
에 정의되어 있습니다. - 6번 줄의
gd->malloc_ptr
에 0을 입력합니다.