The mallinfo/mallinfo2 man and info pages state: Information is returned for only the main memory allocation area. Al‐ locations in other arenas are excluded. See malloc_stats(3) and mal‐ loc_info(3) for alternatives that include information about other are‐ nas. This to me seems to be incorrect; by reading the source code I understand that mallinfo/mallinfo2 return the sum of all arenas ("Total" section in malloc_stats) and not just that of the main arena ("Arena 0" in malloc_stats). On a related note, it would help to have the printf in malloc_stats tweaked to clarify that "Arena 0" is a synonym for the main arena.
Information is returned for only the main memory allocation area. Al‐ locations in other arenas are excluded. See malloc_stats(3) and mal‐ loc_info(3) for alternatives that include information about other are‐ nas. I don't see anything wrong here https://impostor-game.com
The function shows the sum of all arenas - arena 0 + arena 1 + arena 2 + ... The documentation says it only shows the "main" arena, or arena 0, which is the first one. This is not correct.