Left here for archival purposes.

User avatar
By devsaurus
#41825 The node.heap() function shows the total amount of available memory on the heap. If the heap is fairly fragmented there might be a lot of small free pieces that sum up to a big number. It seems that you have enough headroom to further consume heap. But once the firmware tries to allocate a larger chunk and that doesn't fit into one of the free slots... out of memory.
User avatar
By TerryE
#42501 Look at the source for goodness sake. The table allocator uses a doubling algo, so to store the 513th entry it must allocate a new 1024* size_t vector ( and after the copy free the old 512 entry copy. Allocatin chunks that size can fail when you've only got ~8Kb left.