summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--makedef.pl4
-rw-r--r--perl.h9
2 files changed, 10 insertions, 3 deletions
diff --git a/makedef.pl b/makedef.pl
index 4ea12b3b54..cf681a7cbd 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -100,7 +100,9 @@ close(CFG);
# perl.h logic duplication begins
-$define{PL_OP_SLAB_ALLOC} = 1;
+if ($define{PERL_IMPLICIT_SYS}) {
+ $define{PL_OP_SLAB_ALLOC} = 1;
+}
if ($define{USE_ITHREADS}) {
if (!$define{MULTIPLICITY}) {
diff --git a/perl.h b/perl.h
index 39a5a42344..01458d9b65 100644
--- a/perl.h
+++ b/perl.h
@@ -44,8 +44,13 @@
* repeated in makedef.pl, so be certain to update
* both places when editing. */
-#ifndef PL_OP_SLAB_ALLOC
-# define PL_OP_SLAB_ALLOC
+#ifdef PERL_IMPLICIT_SYS
+/* PERL_IMPLICIT_SYS implies PerlMemShared != PerlMem
+ so use slab allocator to avoid lots of MUTEX overhead
+ */
+# ifndef PL_OP_SLAB_ALLOC
+# define PL_OP_SLAB_ALLOC
+# endif
#endif
#ifdef USE_ITHREADS