1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-25 16:22:37 -07:00

Add glossary entry for client pointer (merged from custom/cet/main)

Copied from Perforce
 Change: 183909
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2014-01-09 16:58:32 +00:00
parent b19dd3cbf3
commit d0ebfd2325
4 changed files with 27 additions and 4 deletions

View file

@ -92,6 +92,14 @@ Memory Management Glossary: B
.. opposite:: :term:`derived pointer`.
.. mps:specific::
For objects with :term:`in-band headers`, the MPS
distinguishes between the base pointer, which points to
the start of the header, and the :term:`client pointer`,
which points to the first word after the end of the
header.
best fit
The :term:`allocation policy` that always allocates from the

View file

@ -219,6 +219,16 @@ Memory Management Glossary: C
objects, the other two being :term:`forwarding objects`
and :term:`padding objects`.
client pointer
.. mps:specific::
A pointer to the first word in an object that's not part
of the :term:`in-band header`. See
:ref:`topic-format-headers`.
.. seealso:: :term:`base pointer`.
client program
.. see:: :term:`mutator`

View file

@ -87,6 +87,9 @@ Memory Management Glossary: I
:c:macro:`MPS_KEY_FMT_HEADER_SIZE` :term:`keyword
argument` to :c:func:`mps_fmt_create_k`.
A pointer to the first word after the in-band header is
called a :term:`client pointer`.
in parameter
A function parameter that supplies data from the caller to the

View file

@ -155,14 +155,16 @@ relation to the memory block.
If you have one of these use cases, you should pass the
:c:macro:`MPS_KEY_FMT_HEADER_SIZE` :term:`keyword argument` to
:c:func:`mps_fmt_create_k`, specifying the size of the header: that
is, the offset of a client pointer from the base of the memory block.
is, the offset of a :term:`client pointer` from the base of the memory
block.
There are some cautions to be observed when using in-band headers:
1. The format methods (other than the :term:`padding method`) receive
*client pointers* (that is, pointers past the header) but all other
MPS functions expect to receive and return *base pointers* (that
is, pointers to the base of the block where the header is stored).
:term:`client pointers` (that is, pointers past the header) but all
other MPS functions expect to receive and return :term:`base
pointers` (that is, pointers to the base of the block where the
header is stored).
In particular, :c:func:`mps_reserve` and :c:func:`mps_alloc` always
hand out base pointers, and :c:func:`mps_free` expects to receive