-
Notifications
You must be signed in to change notification settings - Fork 0
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
Make it build on Macos and fix how you template a container template #23
base: staging
Are you sure you want to change the base?
Conversation
MallocExtension::instance()->ReleaseFreeMemory(); | ||
#endif | ||
malloc_stats(); |
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.
malloc_stats()
doesn't depend on TCMALLOC and requires malloc.h
: https://man7.org/linux/man-pages/man3/malloc_stats.3.html
We shouldn't replace malloc.h
with stdlib.h
. Instead, all the parts of the code that depend on malloc.h
must be skipped on macOS:
#ifdef __GLIBC__
#include <malloc.h>
#endif
#ifdef __GLIBC__
malloc_stats();
#endif
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.
Thanks! That makes sense. I've tested it by building on both macos and ubuntu and running encoding/decoding. Do you think there is anything else I can test to make sure it actually works?
@@ -289,7 +289,7 @@ namespace random { | |||
|
|||
std::mt19937 *GetRandomGenerator(); | |||
|
|||
template <typename T, template<class> typename C> | |||
template <typename T, template <typename...> class C> |
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.
We must check that this doesn't break gcc on Linux, in 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.
could you pls give me some direction how we should test it besides building on a linux machine?
Successfully built and tested from the source code following the instructions in the README on
Also tested the build on a Ubuntu machine with a simple script which encodes and decodes random text.