1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 23:10:47 -08:00

Note that mps_key_pool_debug_options is optional, and describe the default value. noted by rb in review <https://info.ravenbrook.com/mail/2014/06/04/14-41-06/0/>.

Copied from Perforce
 Change: 186441
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2014-06-08 17:15:02 +01:00
parent 317cad785d
commit cef8fffc2f
2 changed files with 18 additions and 9 deletions

View file

@ -180,9 +180,11 @@ AMS interface
class.
When creating a debugging AMS pool, :c:func:`mps_pool_create_k`
takes three keyword arguments: :c:macro:`MPS_KEY_FORMAT` and
:c:macro:`MPS_KEY_CHAIN` are as described above, and
:c:macro:`MPS_KEY_POOL_DEBUG_OPTIONS` specifies the debugging
accepts the following keyword arguments:
:c:macro:`MPS_KEY_FORMAT`, :c:macro:`MPS_KEY_CHAIN`,
:c:macro:`MPS_KEY_GEN`, and
:c:macro:`MPS_KEY_AMS_SUPPORT_AMBIGUOUS` are as described above,
and :c:macro:`MPS_KEY_POOL_DEBUG_OPTIONS` specifies the debugging
options. See :c:type:`mps_pool_debug_option_s`.
.. deprecated:: starting with version 1.112.

View file

@ -50,9 +50,9 @@ debugging:
for the pattern at any time by calling
:c:func:`mps_pool_check_free_space`.
The :term:`client program` may specify templates for both of these
features via the :c:type:`mps_pool_debug_option_s` structure. This
allows it to specify patterns:
The :term:`client program` may optionally specify templates for both
of these features via the :c:type:`mps_pool_debug_option_s` structure.
This allows it to specify patterns:
* that mimic illegal data values;
@ -81,15 +81,15 @@ For example::
.. c:type:: mps_pool_debug_option_s
The type of the structure passed as the
The type of the structure passed as the value for the optional
:c:macro:`MPS_KEY_POOL_DEBUG_OPTIONS` keyword argument to
:c:func:`mps_pool_create_k` when creating a debugging :term:`pool
class`. ::
typedef struct mps_pool_debug_option_s {
void *fence_template;
const void *fence_template;
size_t fence_size;
void *free_template;
const void *free_template;
size_t free_size;
} mps_pool_debug_option_s;
@ -114,6 +114,13 @@ For example::
pieces smaller than the given size, for example to pad out part of
a block that was left unused because of alignment requirements.
If the client omits to pass the
:c:macro:`MPS_KEY_POOL_DEBUG_OPTIONS` keyword argument to
:c:func:`mps_pool_create_k`, then the fencepost template consists
of the four bytes ``50 4F 53 54`` (``POST`` in ASCII), and the
free space template consists of the four bytes ``46 52 45 45``
(``FREE`` in ASCII).
.. c:function:: void mps_pool_check_fenceposts(mps_pool_t pool)