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

Keep loaded libraries in memory #44

Closed
3 tasks done
kurtlawrence opened this issue Dec 16, 2019 · 1 comment · Fixed by #54
Closed
3 tasks done

Keep loaded libraries in memory #44

kurtlawrence opened this issue Dec 16, 2019 · 1 comment · Fixed by #54
Labels
bug Something isn't working enhancement New feature or request

Comments

@kurtlawrence
Copy link
Owner

kurtlawrence commented Dec 16, 2019

There is a very specific use case which can result in segfaults. The implementer must send through an object such as a channel that can be sent some actionable thing. Once the papyrus code finishes, if this code is called it will be called on invalid memory (as the library has been dropped at this point).

The solution may be to store loaded libraries, and give the ability to clear the cache at user defined points. Storing would not be the preferred option so would have to be opted into.

Todo:

  • Rename and delete libs
  • Add method to clear out cached libs
  • Remove redirection on execution
@kurtlawrence kurtlawrence added bug Something isn't working enhancement New feature or request labels Dec 16, 2019
@kurtlawrence
Copy link
Owner Author

Renaming was done previously to solve a different issue, the reasoning is kept here.

[Renaming] Has to be done to make linux builds work
see:

Basically the api function dlopen will keep loaded libraries in memory to avoid
continuously allocating memory. It only does not release the library when thread_local data
is hanging around, and it seems println!() is something that does this.
Hence to avoid not having the library not updated with a new new() call, a different lib
name is passed to the function.
This is very annoying as it has needless fs interactions and a growing fs footprint but>
what can you do ¯_(ツ)_/¯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant