-
Notifications
You must be signed in to change notification settings - Fork 0
"Portability problem due to pthread_tryjoin_np and malloc_stats" #1
Comments
I confirm. See: Until we fix this, milk is not compatible with OS-X. Has anyone previously worked around this issue ? |
Some possible debugging notes on this after talking with my programmer colleague. I apologize if these do not help
And this is the source code for pthread_tryjoin: https://code.woboq.org/userspace/glibc/nptl/pthread_tryjoin.c.html So one idea is to take the code that isn't supported, and port it to the Mac libraries that are supported. Here's an example of how to implement malloc_stats. Not sure if this will work in MacOS though: https://chromium.googlesource.com/native_client/nacl-newlib/+/master/newlib/libc/stdlib/mstats.c |
A similar issue to pthread_tryjoin on Mac OS was solved here: |
@thaynecurrie not really similar. the quick-close-fair-patch would be something like the following:
For malloc_stats there is no equivalent, must be implemented at allocator level. BTW, I don't know what use you have of it. The only way I see would be to use vm_allocator or map your allocations. |
When compiling on Mac OS X Sierra, we get the following errors:
COREMOD_memory.c:7225:20: warning: implicit declaration of function 'pthread_tryjoin_np' [-Wimplicit-function-declaration]
if(pthread_tryjoin_np(thread_savefits, NULL) == EBUSY)
CommandLineInterface/CLIcore.c: In function 'printInfo':
CommandLineInterface/CLIcore.c:377:2: warning: implicit declaration of function 'malloc_stats' [-Wimplicit-function-declaration]
malloc_stats();
These functions apparently do not exist under OS X Sierra and will require a work-around.
The text was updated successfully, but these errors were encountered: