Skip to content
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

chore: Build mimalloc as a C++ library #264

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

chore: Build mimalloc as a C++ library #264

wants to merge 4 commits into from

Conversation

chakaz
Copy link
Collaborator

@chakaz chakaz commented May 9, 2024

This will have the benefit of throwing exceptions if allocations fail in the C++ APIs (like new)

Related to #2914

This will have the benefit of throwing exceptions if allocations fail in
the C++ APIs (like `new`)
CMAKE_PASS_FLAGS "-DCMAKE_BUILD_TYPE=Release -DMI_BUILD_SHARED=OFF -DMI_BUILD_TESTS=OFF \
-DMI_INSTALL_TOPLEVEL=ON -DMI_OVERRIDE=OFF -DCMAKE_C_FLAGS=-g \
${HELIO_MIMALLOC_OPTS}"
CMAKE_PASS_FLAGS "-DCMAKE_BUILD_TYPE=Release -DMI_USE_CXX=ON -DMI_BUILD_SHARED=OFF \
Copy link
Collaborator Author

@chakaz chakaz May 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only added -DMI_USE_CXX=ON, the rest is just bad diff display due to line breaks :|

@chakaz
Copy link
Collaborator Author

chakaz commented Jun 23, 2024

@romange do you think we should merge this PR?
I think that, given we know of scenarios in which mimalloc could return nullptr (even if not in our production, although we also suspect other cases in our production), it might be a good idea.
What are the downsides of doing so? It's the same code, if you compile it with a C or C++ compiler, that shouldn't matter I think

@romange
Copy link
Owner

romange commented Jun 23, 2024 via email

@romange romange force-pushed the master branch 3 times, most recently from 45e35b1 to 2290be2 Compare July 13, 2024 17:03
@romange romange force-pushed the master branch 8 times, most recently from 1402f6c to f102aa0 Compare October 28, 2024 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants