ianmcook commented on a change in pull request #9202:
URL: https://github.com/apache/arrow/pull/9202#discussion_r557511872



##########
File path: r/tools/linuxlibs.R
##########
@@ -412,6 +413,23 @@ with_s3_support <- function(env_vars) {
   paste(env_vars, ifelse(arrow_s3, "ARROW_S3=ON", "ARROW_S3=OFF"))
 }
 
+with_mimalloc <- function(env_vars) {
+  arrow_mimalloc <- toupper(Sys.getenv("ARROW_MIMALLOC")) == "ON" || 
tolower(Sys.getenv("LIBARROW_MINIMAL")) == "false"
+  if (arrow_mimalloc) {
+  # User wants mimalloc. Let's make sure they're not on gcc < 4.9
+    info <- system(paste("export", env_vars, "&& $CMAKE 
--system-information"), intern = TRUE)
+    info <- grep("^[A-Z_]* .*$", info, value = TRUE)
+    vals <- as.list(sub('^.*? "?(.*?)"?$', "\\1", info))
+    names(vals) <- sub("^(.*?) .*$", "\\1", info)

Review comment:
       This is copy-pasted from `with_s3_support()` above. Consider factoring 
out into a separate function




----------------------------------------------------------------
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:
[email protected]


Reply via email to