Loading...
--- libmalloc/libmalloc-317.140.5/src/malloc.c
+++ libmalloc/libmalloc-317.100.9/src/malloc.c
@@ -202,24 +202,6 @@
}
#endif /* TARGET_OS_OSX */
-
-#define LIBMALLOC_EXPERIMENT_FACTORS_KEY "MallocExperiment="
-#define LIBMALLOC_EXPERIMENT_DISABLE_MEDIUM (1ULL)
-static void
-__malloc_init_experiments(const char *str)
-{
- uint64_t experiment_factors = 0;
- str = strchr(str, '=');
- if (str) {
- experiment_factors = strtoull_l(str + 1, NULL, 16, NULL);
- }
- switch (experiment_factors) {
- case LIBMALLOC_EXPERIMENT_DISABLE_MEDIUM:
- magazine_medium_enabled = false;
- break;
- }
-}
-
static void
__malloc_init_from_bootargs(const char *bootargs)
{
@@ -341,7 +323,6 @@
}
const char **p;
- const char *malloc_experiments = NULL;
for (p = apple; p && *p; p++) {
if (strstr(*p, "malloc_entropy") == *p) {
int count = __entropy_from_kernel(*p);
@@ -350,9 +331,7 @@
if (sizeof(malloc_entropy) / sizeof(malloc_entropy[0]) == count) {
_malloc_entropy_initialized = true;
}
- }
- if (strstr(*p, LIBMALLOC_EXPERIMENT_FACTORS_KEY) == *p) {
- malloc_experiments = *p;
+ break;
}
}
if (!_malloc_entropy_initialized) {
@@ -360,9 +339,6 @@
_malloc_entropy_initialized = true;
}
- if (malloc_experiments) {
- __malloc_init_experiments(malloc_experiments);
- }
__malloc_init_from_bootargs(bootargs);
mvm_aslr_init();