Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decrease initial memory pages to 1 #2095

Open
ospencer opened this issue Apr 21, 2024 · 3 comments
Open

Decrease initial memory pages to 1 #2095

ospencer opened this issue Apr 21, 2024 · 3 comments
Assignees

Comments

@ospencer
Copy link
Member

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 😛

@ospencer ospencer self-assigned this Apr 21, 2024
@AjaySDwivedi1
Copy link

Can I work on this issue? If I can, what files need to need or do I need to look at?

@ospencer
Copy link
Member Author

@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.

@AjaySDwivedi1
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants