-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add pcre2_get_match_data_heapframes_size() (#191)
Since PCRE2 10.41, the match data contains a pointer to a vector of frames allocated in the heap and that are used by pcre2_match() when doing non JIT matches. There is though, no outside visibility on the size of it, and therefore the memory it uses is locked away until match_data itself is freed. Add an API that allows getting that value, so an application could decide based on its own experienced memory pressure to keep reusing that match_data or not. While at it, update the documentation of other related functions for clarity.
- Loading branch information
Showing
11 changed files
with
139 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<html> | ||
<head> | ||
<title>pcre2_get_match_data_heapframes_size specification</title> | ||
</head> | ||
<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB"> | ||
<h1>pcre2_get_match_data_heapframes_size man page</h1> | ||
<p> | ||
Return to the <a href="index.html">PCRE2 index page</a>. | ||
</p> | ||
<p> | ||
This page is part of the PCRE2 HTML documentation. It was generated | ||
automatically from the original man page. If there is any nonsense in it, | ||
please consult the man page, in case the conversion went wrong. | ||
<br> | ||
<br><b> | ||
SYNOPSIS | ||
</b><br> | ||
<P> | ||
<b>#include <pcre2.h></b> | ||
</P> | ||
<P> | ||
<b>PCRE2_SIZE pcre2_get_match_data_heapframes_size(pcre2_match_data *<i>match_data</i>);</b> | ||
</P> | ||
<br><b> | ||
DESCRIPTION | ||
</b><br> | ||
<P> | ||
This function returns the size, in bytes, of the heapframes data block that is owned | ||
by its argument. | ||
</P> | ||
<P> | ||
There is a complete description of the PCRE2 native API in the | ||
<a href="pcre2api.html"><b>pcre2api</b></a> | ||
page and a description of the POSIX API in the | ||
<a href="pcre2posix.html"><b>pcre2posix</b></a> | ||
page. | ||
<p> | ||
Return to the <a href="index.html">PCRE2 index page</a>. | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.TH PCRE2_GET_MATCH_DATA_HEAPFRAMES_SIZE 3 "13 January 2023" "PCRE2 10.43" | ||
.SH NAME | ||
PCRE2 - Perl-compatible regular expressions (revised API) | ||
.SH SYNOPSIS | ||
.rs | ||
.sp | ||
.B #include <pcre2.h> | ||
.PP | ||
.nf | ||
.B PCRE2_SIZE pcre2_get_match_data_heapframes_size(pcre2_match_data *\fImatch_data\fP); | ||
.fi | ||
. | ||
.SH DESCRIPTION | ||
.rs | ||
.sp | ||
This function returns the size, in bytes, of the heapframes data block that is owned | ||
by its argument. | ||
.P | ||
There is a complete description of the PCRE2 native API in the | ||
.\" HREF | ||
\fBpcre2api\fP | ||
.\" | ||
page and a description of the POSIX API in the | ||
.\" HREF | ||
\fBpcre2posix\fP | ||
.\" | ||
page. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters