2 ms·
The author made a mistake in that blog post. In the section about memory leaks, they say: > Looking at the generated C code it's plainly obvious to see this me
by rcme 4y ago
The author made a mistake in that blog post. In the section about memory leaks, they say:
> Looking at the generated C code it's plainly obvious to see this memory leak. init_consts creates a 1000 byte allocation and never frees it. This is a memory leak that is unavoidable in any program compiled with V.
But the allocated memory is a static allocation. There isn't really a reason to free it. It's used whenever tos2 is called, which happens in many places according to the code. If you complain that this is a memory leak, then you should complain that any static allocation is a memory leak.