CHiPs44 / hagl_pico_vgaboard

HAGL HAL for Raspberry Pi Pico VGA board (scanvideo)
Other
5 stars 1 forks source link

Better way to get free RAM / heap #21

Closed CHiPs44 closed 1 year ago

CHiPs44 commented 1 year ago

cf. https://forums.raspberrypi.com/viewtopic.php?t=347638#p2082565

CHiPs44 commented 1 year ago

Malloc dichotomy: 147437 This method: 151376 From map file: 169136 (0x294B0 = 0x20040000 - 0x20016b50)

$ grep __bss_end__ *.map
                0x0000000020016b50                __bss_end__ = .
$ grep __StackLimit *.map
                0x0000000020040000                __StackLimit = (ORIGIN (RAM) + LENGTH (RAM))
                0x0000000000000001                ASSERT ((__StackLimit >= __HeapLimit), region RAM overflowed)
tuupola commented 1 year ago

Interesting why the difference. I also use the forum method here.