-
Notifications
You must be signed in to change notification settings - Fork 883
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
Specify default options at compile time #945
Comments
Hi Manuel, hope you are doing well. In the Aside: Normally though, the memory for such arena is only "reserved", not "committed" yet so it should not lead to an OOM even though it reserve 1GiB at a time. This is controlled by |
Hi Daan! All good, thanks for asking. :) I guess I wasn't clear enough. I would like to be able to change some options before mimalloc is initialized, but if possible without changing the mimalloc source code. Changing the default parameters just seem the obvious approach, but I would also take any other solution. Most importantly, we prefer to not have to change 3rdParty code (which includes mimalloc). Regarding arena size and reserve/commit - ATM it is just a guess that the arena size is causing the OOM issues - we are still investigating. |
Ah I see. There are some options that are read before user code can set them -- it'll still work from environment variables but that is probably not what you want. We could add some pre-processor definitions here for the defaults of those options that may be needed early in mimalloc -- like the I guess the compile time options would be: |
I pushed an update to |
Yes, I think that should work - thank you! |
Is there a way to specify the default values for the options during compile time? From what I have seen in the code so far this does not seem to be the case. In particular we are concerned about the default value of
arena_reserve
because we have seen some OOM issues during the first tests.Background: we are thinking about using mimalloc statically linked into a shared library which itself is used by some Java application. If we are setting the options at runtime after the library has been loaded it is probably too late.
The text was updated successfully, but these errors were encountered: