-
Notifications
You must be signed in to change notification settings - Fork 11
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
Provide VirtualStack implementation #6
Comments
What was the reason for writing a custom VirtualStack implementation rather than using Native's Arena class and/or memScoped function? |
The last time I checked, the native arena and memScoped call some sort of malloc, possibly a wrapper around the real malloc. It would be much better if small objects like Int and Long didn't require malloc each time. Might as well recycle a single allocation. |
That seems to still be the case. Thanks for the explanation. |
On native platforms there's a
com.kgl.utils.VirtualStack
used for allocations for temporaries when interacting with C. At the moment it just forwards allocations tonativeHeap
which is not ideal.Ideally
VirtualStack
should create a large chunk of memory (about 64KB) to be re-used for function calls.The text was updated successfully, but these errors were encountered: