News for hackers. Stuff that matters.
Re:The 4tH compiler by ehaliewicz2 on Monday November 26, 2018 @06:01PM (#18537646)
Dynamic memory allocation seems like something you'd generally want to avoid in real-time programs and games. Slab allocation is often used (I think that's the right term, allocate a large chunk of memory at startup, bump a pointer to allocate, reset the pointer to free all memory at once), and that's simple to implement in Forth.

If inner interpreter overhead is an issue, there are well known solutions to that as well. Subroutine threading removes the inner interpreter entirely, and makes it simple to implement inlining in the compiler, and then there's always the inline assembly approach.

Re:The 4tH compiler by Someone on Monday November 26, 2018 @07:25PM (#18538147)
FYI: it’s region, zone, arena, area, or memory context (https://en.wikipedia.org/wiki/Region-based_memory_management), not slab.

‘Slab allocation’ is an implementation strategy for a ‘normal’ memory allocator, where each block gets freed individually (https://en.wikipedia.org/wiki/Slab_allocation)

Re:The 4tH compiler by ehaliewicz2 on Monday November 26, 2018 @07:42PM (#18538251)
I thought I might have been wrong, but didn't bother looking it up. Thanks.