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

Static memory allocation should support layering somehow #42

Open
velipso opened this issue Jun 1, 2023 · 0 comments
Open

Static memory allocation should support layering somehow #42

velipso opened this issue Jun 1, 2023 · 0 comments

Comments

@velipso
Copy link
Owner

velipso commented Jun 1, 2023

.struct Player = iwram(-1) // all layers
  // ...
.end

Something like iwram(v) where v is a 32-bit number that says whether the struct should be allocated to that layer.

So that means there are 32 layers to work with. iwram(-1) means all layers due to all bits being on.

This complicates the allocation algorithm and could leave gaps, depending on the layering.

Maybe the syntax should be nicer though, like ranges:

.struct Player = iwram(0-4, 8, 10)
  // ...
.end

Though would still limit it 0-31, and default to all if no range provided.

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

No branches or pull requests

1 participant