PL_registered_mros can start with 1 hash bucket, as it will probably never
authorNicholas Clark <nick@ccl4.org>
Mon, 29 Dec 2008 11:22:55 +0000 (11:22 +0000)
committerDavid Mitchell <davem@iabyn.com>
Mon, 30 Mar 2009 17:16:20 +0000 (18:16 +0100)
contain more than "dfs", and even if C3 is loaded, 2 buckets are less than the
default of 8.

(cherry picked from commit 9e1694326ed89111b35daf7589dacbe10253cdcd)

perl.c

diff --git a/perl.c b/perl.c
index fcfcd05..3f434ff 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -461,6 +461,8 @@ perl_construct(pTHXx)
 #endif
 
     PL_registered_mros = newHV();
+    /* Start with 1 bucket, for DFS.  It's unlikely we'll need more.  */
+    HvMAX(PL_registered_mros) = 0;
 
     ENTER;
 }