Re: [pcre-dev] pattern info per pcretest

Kezdőlap
Üzenet törlése
Szerző: Philip Hazel
Dátum:  
Címzett: Sheri
CC: pcre-dev@exim.org
Tárgy: Re: [pcre-dev] pattern info per pcretest
On Thu, 1 Dec 2011, Sheri wrote:

> Thanks guys, I was and am merely trying to user-test an application and wanted
> to use pcretest to give me the "right" answers. Should it concern me if the
> code size for the same pattern testing in pcretest and the application do not
> match? For "a" I get 9 in pcretest and 49 in the application.


The 9 is the size of the compiled code:

re> /a/MD


Memory allocation (code space): 9
------------------------------------------------------------------
  0   5 Bra
  3     a
  5   5 Ket
  8     End
------------------------------------------------------------------


As you can see, 9 bytes are occupied by compiled code. The figure of 49
is presumably what was obtained via malloc. This includes the size of
the pcre structure, which on a 32-bit system will indeed by 40 bytes.
Thus, a total of 49 bytes are needed. On a 64-bit system, the size of
the pcre block will be greater; if LINK_SIZE is not 2, the size of the
compiled code will be greater.

The value given by pcretest is really for testing/debugging or just
interest/statistical purposes.

Since he posted his message, Zoltan has realized it is easy to make the
JIT size available, and as he was making some other changes, he has done
it. I should be able to get it into pcretest for the forthcoming 8.21
release, though that is really meant just to be bugfixes. However, it's
a small thing.

> Also, I would like to distribution interim updates but cannot prepare the html
> documentation (no groff). Phillip would it be possible for you to
> automatically trigger updates to the html versions when you update the doc
> files?


It is up to you, but between releases the code is not guaranteed to be
as well tested. I run a whole series of tests with different
compile-time options just before a release, including
--disable-stack-for-recursion, which is not normally configured for me.
These have on occasion shown up problems that needed fixing. Also, the
version number, RC number, and date do not get updated until just before
a release.

I would have to remember to build the html documentation when I update
the other doc files. I guess I could try to do that.

> Finally, I use ViewVC for viewing the development files. I see on the Help
> page that one of the ViewVC configuration options would enable downloading
> tarballs. It would be useful to me if that could be enabled, unless there are
> other concerns that preclude that.


Ah. I know nothing about that side of things. I will ask the managers of
the site.

Philip

--
Philip Hazel