bobbimanners / EightBall

The Eight Bit Algorithmic Language for Apple II, Commodore 64 and VIC20
GNU General Public License v3.0
19 stars 3 forks source link

Fix linker table location in memory #19

Closed bobbimanners closed 6 years ago

bobbimanners commented 6 years ago

The compiler allocates the linker tables using the same heap as source code (and same allocator). Write an allocator to put them at the top of this heap instead of being interleaved with lines of source. This means they can be easily freed after compilation so we don't leak memory with every comp.

bobbimanners commented 6 years ago

Fixed in v0.56. Created new allocators for bottom-up heap and top-down stack in arena HEAP2.

The bottom-up allocator is used for source code. The top-down allocator is used for the linkage table. This top-down stack is dumped immediately after compilation is done.