-
int initf_malloc(void)Boot Loader/U-BOOT 2019. 9. 26. 22:03
/common/dlmalloc.c
12345678910int initf_malloc(void){#ifdef CONFIG_SYS_MALLOC_F_LENassert(gd->malloc_base); /* Set up by crt0.S */gd->malloc_limit = CONFIG_SYS_MALLOC_F_LEN;gd->malloc_ptr = 0;#endifreturn 0;}CONFIG_SYS_MALLOC_F_LEN=0x400으로 정의되어있다.
assert()는 false이면 프로그램을 중단시켜준다.
board_init_f_init_reserve에서 gd->malloc_base에 값을 지정해주므로 중지되지않고 흘러간다.
'Boot Loader > U-BOOT' 카테고리의 다른 글
int arch_cpu_init(void) (0) 2019.09.27 static int initf_console_record(void) (0) 2019.09.26 int fdtdec_setup(void) (0) 2019.09.25 static int setup_mon_len(void) (0) 2019.09.25 _main (0) 2019.09.25