summaryrefslogtreecommitdiff
path: root/ext/Devel-Peek
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-05-18 11:45:22 +0100
committerNicholas Clark <nick@ccl4.org>2011-06-11 09:40:03 +0200
commit2bda37bab5fb768caff2b228fda376b75df4815c (patch)
tree8dada944c2255f5bf9415e0872b879137c331b59 /ext/Devel-Peek
parent9402563ac1ee6a7649763b93342cb2940addf915 (diff)
downloadperl-2bda37bab5fb768caff2b228fda376b75df4815c.tar.gz
Store the BM table in mg_ptr instead of after SvCUR().
Previously the 256 byte Boyer-Moore table was stored in the buffer of SvPVX() after the raw string by extending the buffer. Given that the scalar is alway upgraded to add PERL_MAGIC_bm magic, to clear the table and other flags, there's no extra memory cost in using mg_ptr in the MAGIC struct to point directly to the table. I believe that this removes the last place in the core that stores data beyond SvCUR().
Diffstat (limited to 'ext/Devel-Peek')
-rw-r--r--ext/Devel-Peek/t/Peek.t4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t
index 715d7f0102..c0cfa93bce 100644
--- a/ext/Devel-Peek/t/Peek.t
+++ b/ext/Devel-Peek/t/Peek.t
@@ -816,6 +816,8 @@ unless ($Config{useithreads}) {
MAGIC = $ADDR
MG_VIRTUAL = &PL_vtbl_bm
MG_TYPE = PERL_MAGIC_bm\\(B\\)
+ MG_LEN = 256
+ MG_PTR = $ADDR "(?:\\\\\d){256}"
RARE = \d+
PREVIOUS = 1
USEFUL = 100
@@ -833,6 +835,8 @@ unless ($Config{useithreads}) {
MAGIC = $ADDR
MG_VIRTUAL = &PL_vtbl_bm
MG_TYPE = PERL_MAGIC_bm\\(B\\)
+ MG_LEN = 256
+ MG_PTR = $ADDR "(?:\\\\\d){256}"
RARE = \d+
PREVIOUS = 1
USEFUL = 100