-
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
Fix external pagemap usage. #221
Conversation
Could you add unit tests, so these don't break in the future? |
I've been pondering how to do this. These only show up when snmalloc is used as the malloc implementation in libc and also in another library. |
So we have tests that build two different allocators, could you modify that to cover this case: Does it have to be in libc? |
Possibly not. I'll have a look at whether we can make one of those find the other's pagemap. |
I've added a unit test. This is blocking work in Verona, so it would be good to get it merged soon. |
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.
Looks good minor fixes
At some point in the refactoring, these were broken.
3cf85dd
to
7556de9
Compare
@@ -0,0 +1,30 @@ | |||
#if defined(SNMALLOC_PASS_THROUGH) || defined(_WIN32) |
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.
If you set a SNMALLOC_NAME_MANGLE
then you can make the test work on Windows.
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.
That's not the problem. The Windows declarations for the standard malloc functions have a bunch of declspecs in them that we're not using and this causes compile failures.
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.
If you had set a name mangle then they wouldn't conflict.
At some point in the refactoring, these were broken.