Remix.run Logo
MiroslavPokorny 12 hours ago

What does Goose change about memory management ?

zamalek 11 hours ago | parent | next [-]

If I am reading it correctly, the compiler creates N bump allocators per function (or possibly globally) - where N is (I'm guessing at this point) determined by liveness or similar.

5 hours ago | parent [-]
[deleted]
kenferry 11 hours ago | parent | prev | next [-]

A lot - title could probably use editing. The language has no heap, only stack memory, so the only deallocation is returning from a call stack frame.

yndoendo 11 hours ago | parent [-]

How big is the stack? Too often large data will blow the top and destroy adjacent stacks in multi-thread environments. Are memory barrier fences used to check against overflow?

gcoakes 11 hours ago | parent | next [-]

I think it is supposed to be stacks in the general sense of the data structure, not the literal `sp` register. I imagine they could be arbitrarily sized up to physical limits if you do some mmap magic. I'm still a bit fuzzy about how you could make useful programs with that, but it seems interesting.

MiroslavPokorny 9 hours ago | parent [-]

Stack allocations will be lost when the enclosing call exits.

How does this help for long term values ?

bobbydigitales 10 hours ago | parent | prev [-]

[dead]

bobbydigitales 12 hours ago | parent | prev [-]

[dead]