-
Notifications
You must be signed in to change notification settings - Fork 112
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
Haiku support proposal. #218
Conversation
@devnexen Could you add an
should fix that. |
Basic PAL implementation. This platform does not support TLS modes.
https://git.haiku-os.org/haiku/commit/?id=b94221f3b29c00321e4fe15fcdf499b7275a389c So the Posix platforms are assuming over commit. Should we set the flag mention in this link? |
@devexen thanks for fixing the issues. My only remaining concerns is how BSS is implemented in Haiku. Does it overcommit bss, or not? On platforms with lazy commit/ overcommit, we load a large flat pagemap in BSS. This is very efficient as it doesn't require any initialisation checking, and also allows for the loader to point the code directly at this map without an indirection. However, it doesn't give much control for how it is loaded. This could make the snmalloc RSS look 16MiB higher in the default configuration, but we will probably only be using a single page from it. I could add a layer of indirection for certain platforms. I know this would help @nwf for his work with CHERI platforms, where the pagemap has to be much larger. I think we can take this PR as is which could be used for testing on Haiku, but we should be aware that the RSS numbers can be improved, and any comparison with other allocators on Haiku done before that work should take this into account. |
add_compile_options(-fno-exceptions -fno-rtti -g -ftls-model=initial-exec -fomit-frame-pointer) | ||
add_compile_options(-fno-exceptions -fno-rtti -g -fomit-frame-pointer) | ||
if (NOT CMAKE_SYSTEM_NAME MATCHES "Haiku") | ||
add_compile_options(-ftls-model=initial-exec) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please can you leave a comment explaining this? Is there a Haiku TLS ABI doc that you can point at?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really but found out a bunch of complains about the same issue I ve faced. Haiku at large is not too well documented, kind of small community driven os project.
0); | ||
|
||
if (r != MAP_FAILED) | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find documentation for the Haiku mmap call. Does it guarantee that the existing mapping is left in place if the map fails?
Basic PAL implementation.
This platform does not support TLS modes.