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

Smarter memory allocation mechanism in SPI #8

Open
tylergu opened this issue Mar 11, 2021 · 2 comments
Open

Smarter memory allocation mechanism in SPI #8

tylergu opened this issue Mar 11, 2021 · 2 comments
Labels
future improvement Issues that have a work around right now, but can be better solved in the future

Comments

@tylergu
Copy link
Contributor

tylergu commented Mar 11, 2021

Currently SPI finds free intervals between objects and tries to find a free interval for each CodeObject. A better memory allocation mechanism should be developed.

Ideally we should have a single pool of memory for all CodeObject, and memory allocation requests would look for a chunk of memory within a specific range. When this pool runs out of memory, we would mmap more memory from the free intervals based on the /proc/$pid/maps file.

Right now we are trying some simpler workarounds.

@tylergu tylergu added the future improvement Issues that have a work around right now, but can be better solved in the future label Apr 13, 2021
@tylergu
Copy link
Contributor Author

tylergu commented Apr 14, 2021

A work around is implemented by PR #13

@Ethane98
Copy link
Contributor

When objects are loaded without large enough free intervals between them, SPI must malloc a new buffer and install a long jump for each mapped object. A smarter memory allocator could map multiple objects into one buffer as a future optimization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
future improvement Issues that have a work around right now, but can be better solved in the future
Projects
None yet
Development

No branches or pull requests

2 participants