From 8fb1e64614aaebb4245605db77459871d33db9f2 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Fri, 10 Oct 2014 12:42:29 +0100 Subject: [PATCH] Don't talk about "segments" in the pool documentation (this is a detail of the implementation, and may change). The restriction that "buffered allocation can't allocate across segment boundaries" no longer affects MVFF as the pool no longer uses segments. Copied from Perforce Change: 187179 ServerID: perforce.ravenbrook.com --- mps/manual/source/pool/amc.rst | 4 ++-- mps/manual/source/pool/mfs.rst | 14 +++++++------- mps/manual/source/pool/mv.rst | 4 ++-- mps/manual/source/pool/mvff.rst | 9 ++------- 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/mps/manual/source/pool/amc.rst b/mps/manual/source/pool/amc.rst index edd1dbd3e07..0562b9bce5a 100644 --- a/mps/manual/source/pool/amc.rst +++ b/mps/manual/source/pool/amc.rst @@ -128,8 +128,8 @@ AMC interface pointers` keep objects alive. * :c:macro:`MPS_KEY_EXTEND_BY` (type :c:type:`size_t`, - default 4096) is the default :term:`size` of segment that the pool will - request from the :term:`arena`. + default 4096) is the default :term:`size` of block that the pool + will request from the :term:`arena`. For example:: diff --git a/mps/manual/source/pool/mfs.rst b/mps/manual/source/pool/mfs.rst index e130e3fcda4..c4501d05c54 100644 --- a/mps/manual/source/pool/mfs.rst +++ b/mps/manual/source/pool/mfs.rst @@ -89,12 +89,12 @@ MFS interface In addition, :c:func:`mps_pool_create_k` may take: - * :c:macro:`MPS_KEY_EXTEND_BY` (type :c:type:`size_t`, default 65536) is the - :term:`size` of segment that the pool will request from the - :term:`arena`. It must be at least as big as the unit size - specified by the :c:macro:`MPS_KEY_MFS_UNIT_SIZE` keyword - argument. If this is not a multiple of the unit size, there will - be wasted space in each segment. + * :c:macro:`MPS_KEY_EXTEND_BY` (type :c:type:`size_t`, + default 65536) is the :term:`size` of block that the pool will + request from the :term:`arena`. It must be at least as big as + the unit size specified by the :c:macro:`MPS_KEY_MFS_UNIT_SIZE` + keyword argument. If this is not a multiple of the unit size, + there will be wasted space in each block. For example:: @@ -106,7 +106,7 @@ MFS interface .. deprecated:: starting with version 1.112. - When using :c:func:`mps_pool_create`, pass the segment size and + When using :c:func:`mps_pool_create`, pass the block size and unit size like this:: mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena, diff --git a/mps/manual/source/pool/mv.rst b/mps/manual/source/pool/mv.rst index 1e098ff5a63..8561e96d7d1 100644 --- a/mps/manual/source/pool/mv.rst +++ b/mps/manual/source/pool/mv.rst @@ -80,7 +80,7 @@ MV interface :c:func:`mps_free`, it will be rounded up to the pool's alignment. * :c:macro:`MPS_KEY_EXTEND_BY` (type :c:type:`size_t`, - default 65536) is the :term:`size` of segment that the pool will + default 65536) is the :term:`size` of block that the pool will request from the :term:`arena`. * :c:macro:`MPS_KEY_MEAN_SIZE` (type :c:type:`size_t`, default 32) @@ -107,7 +107,7 @@ MV interface .. deprecated:: starting with version 1.112. - When using :c:func:`mps_pool_create`, pass the segment size, + When using :c:func:`mps_pool_create`, pass the block size, mean size, and maximum size like this:: mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena, diff --git a/mps/manual/source/pool/mvff.rst b/mps/manual/source/pool/mvff.rst index 5dce87d5f3c..64c6a0c9c31 100644 --- a/mps/manual/source/pool/mvff.rst +++ b/mps/manual/source/pool/mvff.rst @@ -42,11 +42,6 @@ on the same pool, because the worst-fit policy of buffer filling will grab all the large blocks, leading to severe fragmentation. If you need both forms of allocation, use two separate pools. -Note that buffered allocation can't allocate across segment boundaries -(see :ref:`topic-allocation-point-implementation` for the technical -reason). This can cause added external fragmentation if objects are -allocated that are a significant fraction of the segment size. - .. note:: If you need to allocate large objects in an MVFF pool, @@ -116,7 +111,7 @@ MVFF interface the following :term:`keyword arguments`: * :c:macro:`MPS_KEY_EXTEND_BY` (type :c:type:`size_t`, default - 65536) is the :term:`size` of segment that the pool will request + 65536) is the :term:`size` of block that the pool will request from the :term:`arena`. * :c:macro:`MPS_KEY_MEAN_SIZE` (type :c:type:`size_t`, default 32) @@ -139,7 +134,7 @@ MVFF interface arena for use by other pools. * :c:macro:`MPS_KEY_MVFF_ARENA_HIGH` (type :c:type:`mps_bool_t`, - default false) determines whether new segments are acquired at high + default false) determines whether new blocks are acquired at high addresses (if true), or at low addresses (if false). * :c:macro:`MPS_KEY_MVFF_SLOT_HIGH` [#not-ap]_ (type :c:type:`mps_bool_t`,