This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Store the BM table in mg_ptr instead of after SvCUR().
authorNicholas Clark <nick@ccl4.org>
Wed, 18 May 2011 10:45:22 +0000 (11:45 +0100)
committerNicholas Clark <nick@ccl4.org>
Sat, 11 Jun 2011 07:40:03 +0000 (09:40 +0200)
commit2bda37bab5fb768caff2b228fda376b75df4815c
tree8dada944c2255f5bf9415e0872b879137c331b59
parent9402563ac1ee6a7649763b93342cb2940addf915
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().
ext/B/B.xs
ext/Devel-Peek/t/Peek.t
sv.h
util.c