Last active
April 25, 2018 18:39
-
-
Save khamusa/57a7660a69c7021ea1c1dea92c73a0bc to your computer and use it in GitHub Desktop.
Patch for compiling ruby 2.4.0 supporting MEMORY and ALLOCATIONS metrics with rails-perftest gem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 043ab545e23347f0c55cad1d152dd8fb2c46fa21 | |
Author: Samuel Brandão <[email protected]> | |
Date: Wed Apr 25 15:16:19 2018 -0300 | |
GC calculations of allocated size | |
diff --git a/gc.c b/gc.c | |
index 847062557f..4bd2284698 100644 | |
--- a/gc.c | |
+++ b/gc.c | |
@@ -304,10 +304,10 @@ static ruby_gc_params_t gc_params = { | |
#endif | |
#if defined(HAVE_MALLOC_USABLE_SIZE) || CALC_EXACT_MALLOC_SIZE > 0 | |
#ifndef MALLOC_ALLOCATED_SIZE | |
-#define MALLOC_ALLOCATED_SIZE 0 | |
+#define MALLOC_ALLOCATED_SIZE 1 | |
#endif | |
#else | |
-#define MALLOC_ALLOCATED_SIZE 0 | |
+#define MALLOC_ALLOCATED_SIZE 1 | |
#endif | |
#ifndef MALLOC_ALLOCATED_SIZE_CHECK | |
#define MALLOC_ALLOCATED_SIZE_CHECK 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With rvm, the following should work, adding this patch and the railsexpress patches: