You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/04/20 22:42:26 UTC

[GitHub] [arrow] jonkeane opened a new pull request #10117: ARROW-12485: [C++] Use mimalloc as the default memory allocator on macOS

jonkeane opened a new pull request #10117:
URL: https://github.com/apache/arrow/pull/10117


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] jonkeane commented on a change in pull request #10117: ARROW-12485: [C++] Use mimalloc as the default memory allocator on macOS

Posted by GitBox <gi...@apache.org>.
jonkeane commented on a change in pull request #10117:
URL: https://github.com/apache/arrow/pull/10117#discussion_r617519386



##########
File path: cpp/src/arrow/memory_pool.cc
##########
@@ -170,13 +170,8 @@ MemoryPoolBackend DefaultBackend() {
   if (backend.has_value()) {
     return backend.value();
   }
-#ifdef ARROW_JEMALLOC
-  return MemoryPoolBackend::Jemalloc;
-#elif defined(ARROW_MIMALLOC)
-  return MemoryPoolBackend::Mimalloc;
-#else
-  return MemoryPoolBackend::System;
-#endif
+  struct SupportedBackend default_backend = SupportedBackends().front();
+  return default_backend.backend;

Review comment:
       Yup, I did test this locally to make sure, and it works like I expected it to: mimalloc is default with no `ARROW_DEFAULT_MEMORY_POOL` set and also with a `ARROW_DEFAULT_MEMORY_POOL` set that is not supported / non existent. 
   
   Thanks!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] kszucs closed pull request #10117: ARROW-12485: [C++] Use mimalloc as the default memory allocator on macOS

Posted by GitBox <gi...@apache.org>.
kszucs closed pull request #10117:
URL: https://github.com/apache/arrow/pull/10117


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] jonkeane commented on pull request #10117: ARROW-12485: [C++] Use mimalloc as the default memory allocator on macOS

Posted by GitBox <gi...@apache.org>.
jonkeane commented on pull request #10117:
URL: https://github.com/apache/arrow/pull/10117#issuecomment-823702755


   The MacOS build failures are related to https://issues.apache.org/jira/browse/ARROW-12467
   
   and the MinGW are unrelated to this change (and are [failing on master](https://github.com/apache/arrow/actions/runs/767382617))
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #10117: ARROW-12485: [C++] Use mimalloc as the default memory allocator on macOS

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #10117:
URL: https://github.com/apache/arrow/pull/10117#issuecomment-823644797


   https://issues.apache.org/jira/browse/ARROW-12485


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] jonkeane commented on pull request #10117: ARROW-12485: [C++] Use mimalloc as the default memory allocator on macOS

Posted by GitBox <gi...@apache.org>.
jonkeane commented on pull request #10117:
URL: https://github.com/apache/arrow/pull/10117#issuecomment-823645660


   I'm not sure if `SupportedBackends().front()` is the right approach here (or if it is if I should combine it all onto the `return` line)>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] jonkeane commented on pull request #10117: ARROW-12485: [C++] Use mimalloc as the default memory allocator on macOS

Posted by GitBox <gi...@apache.org>.
jonkeane commented on pull request #10117:
URL: https://github.com/apache/arrow/pull/10117#issuecomment-823653285


   @github-actions autotune


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] pitrou commented on a change in pull request #10117: ARROW-12485: [C++] Use mimalloc as the default memory allocator on macOS

Posted by GitBox <gi...@apache.org>.
pitrou commented on a change in pull request #10117:
URL: https://github.com/apache/arrow/pull/10117#discussion_r617315364



##########
File path: cpp/src/arrow/memory_pool.cc
##########
@@ -170,13 +170,8 @@ MemoryPoolBackend DefaultBackend() {
   if (backend.has_value()) {
     return backend.value();
   }
-#ifdef ARROW_JEMALLOC
-  return MemoryPoolBackend::Jemalloc;
-#elif defined(ARROW_MIMALLOC)
-  return MemoryPoolBackend::Mimalloc;
-#else
-  return MemoryPoolBackend::System;
-#endif
+  struct SupportedBackend default_backend = SupportedBackends().front();
+  return default_backend.backend;

Review comment:
       Or simply:
   ```c++
     return SupportedBackends().front().backend;
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org