-
Notifications
You must be signed in to change notification settings - Fork 69
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
Better support for optional spaces #1173
Comments
Can you give an example when a binding needs to do this (they only know what space to use at run-time, not at build-time)? If the cost of creating a space is cheap, why do we want to use |
So in Android, both the image space and Zygote are command-line options. If one doesn't provide the This is not a big deal for the image space since we can't actually allocate memory for it, but it is relevant to the Zygote space. I originally was implementing it like you said by always having a Zygote space and not using it when the command-line option was not passed, but I thought this would be better software engineering-wise to put the space behind an
Because that requires trusting/ensuring the developer has not accidentally used the space. My stance has always been that something depending on developer discipline does not scale. So in such cases we should leverage Rust's type system to avoid making mistakes.
That's an interesting idea and I wasn't considering it (yet), but I think it might actually be cleaner in some ways than our current conditional compilation model. |
We should add better support for optional spaces inside plans. Here optional means
Option<T>
instead of conditional compilation like we have with VM space. Using optional spaces can be useful when you only want to allocate certain spaces when some command-line option has been set, for example.The text was updated successfully, but these errors were encountered: