26.なぜプロジェクトをリンクしているときに 'Undefined reference to malloc_getpagesize_P'が表示されますか?
26.なぜプロジェクトをリンクしているときに 'Undefined reference to malloc_getpagesize_P'が表示されますか?
When I build my project with Atollic TrueSTUDIO version 2.1.0 and later I get 'Undefined reference to `malloc_getpagesize_P`' when linking the project.This is because in 2.1.0 and later it is possible to change the desired page size that malloc should use at link time.
Therefore the malloc_getpagesize_P symbol needs to be defined.
You can do this by adding the following flag to the linker flags:
-Wl,--defsym=malloc_getpagesize_P=0x1000
This will set the default malloc page size to 4096 bytes, other proposed size for the pages is 128 bytes (0x80).