Difference between ESP.getFreeHeap() and xPortGetFreeHeapSize() ?
Posted: Wed May 11, 2022 7:42 pm
Hello,
I've been using xPortGetFreeHeapSize() in my project with a LOLIN32 V1.0.0 dev board and it's been working fine.
I tried upgrading my project to a LOLIN D32 PRO dev board with the exact same code (using Arduino framework on PIO), and now xPortGetFreeHeapSize() returns values around ~4,257,896 bytes instead of the ~100k range it was returning on the LOLIN32 board.
So I switched to ESP.getFreeHeap() instead, which seems to work, but on the LOLIN32 board, there's a constant 29,512 byte difference between the two function calls, with ESP.getFreeHeap() always being 29,512 bytes larger than xPortGetFreeHeapSize().
Any ideas why they would be different, and by this (seemingly fixed) amount?
Thank you.
I've been using xPortGetFreeHeapSize() in my project with a LOLIN32 V1.0.0 dev board and it's been working fine.
I tried upgrading my project to a LOLIN D32 PRO dev board with the exact same code (using Arduino framework on PIO), and now xPortGetFreeHeapSize() returns values around ~4,257,896 bytes instead of the ~100k range it was returning on the LOLIN32 board.
So I switched to ESP.getFreeHeap() instead, which seems to work, but on the LOLIN32 board, there's a constant 29,512 byte difference between the two function calls, with ESP.getFreeHeap() always being 29,512 bytes larger than xPortGetFreeHeapSize().
Any ideas why they would be different, and by this (seemingly fixed) amount?
Thank you.