grain
grain copied to clipboard
Decrease initial memory pages to 1
I arbitrarily chose the number 64 way back when. I don't know why.
The Grain runtime reserves 2k of space for itself (and only uses about 1k). A hello world program uses only about 400 bytes of actual allocated memory.
I don't think we need to start programs with 4 megabytes of memory 😛
Can I work on this issue? If I can, what files need to need or do I need to look at?
@AjaySDwivedi1 sure! It's mainly changing this line: https://github.com/grain-lang/grain/blob/main/compiler/src/utils/config.re#L367
There may be some references to this number in the CLI docs, so you'd just need to search code nearby initial_memory_pages or initial-memory-pages.
@ospencer for the code that has initial_memory_pages or initial-memory-pages, what changes need to be made? I checked them and I didn't know what to change.