mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 01:34:21 +00:00
Rename mps_key_arena_commit_limit and mps_key_arena_spare_commit_limit as mps_key_commit_limit and mps_key_spare_commit_limit respectively, as suggested by nb in review.
Copied from Perforce Change: 188286 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
000df4fd79
commit
537af4b0dc
16 changed files with 77 additions and 77 deletions
|
|
@ -312,7 +312,7 @@ int main(int argc, char *argv[])
|
|||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SIZE, scale * testArenaSIZE);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_GRAIN_SIZE, grainSize);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_COMMIT_LIMIT, scale * testArenaSIZE);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_COMMIT_LIMIT, scale * testArenaSIZE);
|
||||
die(mps_arena_create_k(&arena, mps_arena_class_vm(), args), "arena_create");
|
||||
} MPS_ARGS_END(args);
|
||||
mps_message_type_enable(arena, mps_message_type_gc());
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ int main(int argc, char *argv[])
|
|||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SIZE, testArenaSIZE);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_GRAIN_SIZE, rnd_grain(testArenaSIZE));
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_COMMIT_LIMIT, testArenaSIZE);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_COMMIT_LIMIT, testArenaSIZE);
|
||||
die(mps_arena_create_k(&arena, mps_arena_class_vm(), args), "arena_create");
|
||||
} MPS_ARGS_END(args);
|
||||
mps_message_type_enable(arena, mps_message_type_gc());
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ static void test_arena(int mode)
|
|||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SIZE, testArenaSIZE);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_GRAIN_SIZE, rnd_grain(testArenaSIZE));
|
||||
if (mode == ModeCOMMIT)
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_COMMIT_LIMIT, 2 * testArenaSIZE);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_COMMIT_LIMIT, 2 * testArenaSIZE);
|
||||
die(mps_arena_create_k(&arena, mps_arena_class_vm(), args), "arena_create");
|
||||
} MPS_ARGS_END(args);
|
||||
mps_message_type_enable(arena, mps_message_type_gc());
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ int main(int argc, char *argv[])
|
|||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SIZE, testArenaSIZE);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_GRAIN_SIZE, rnd_grain(testArenaSIZE));
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_COMMIT_LIMIT, 2 * testArenaSIZE);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_COMMIT_LIMIT, 2 * testArenaSIZE);
|
||||
die(mps_arena_create_k(&arena, mps_arena_class_vm(), args), "arena_create");
|
||||
} MPS_ARGS_END(args);
|
||||
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ int main(int argc, char *argv[])
|
|||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SIZE, 2 * testArenaSIZE);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_GRAIN_SIZE, rnd_grain(2*testArenaSIZE));
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_COMMIT_LIMIT, testArenaSIZE);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_COMMIT_LIMIT, testArenaSIZE);
|
||||
test(mps_arena_class_vm(), args, &fenceOptions);
|
||||
} MPS_ARGS_END(args);
|
||||
|
||||
|
|
|
|||
|
|
@ -207,9 +207,9 @@ Res ArenaInit(Arena arena, ArenaClass class, Size grainSize, ArgList args)
|
|||
|
||||
if (ArgPick(&arg, args, MPS_KEY_ARENA_ZONED))
|
||||
zoned = arg.val.b;
|
||||
if (ArgPick(&arg, args, MPS_KEY_ARENA_COMMIT_LIMIT))
|
||||
if (ArgPick(&arg, args, MPS_KEY_COMMIT_LIMIT))
|
||||
commitLimit = arg.val.size;
|
||||
if (ArgPick(&arg, args, MPS_KEY_ARENA_SPARE_COMMIT_LIMIT))
|
||||
if (ArgPick(&arg, args, MPS_KEY_SPARE_COMMIT_LIMIT))
|
||||
spareCommitLimit = arg.val.size;
|
||||
|
||||
arena->class = class;
|
||||
|
|
@ -289,11 +289,11 @@ ARG_DEFINE_KEY(VMW3_TOP_DOWN, Bool);
|
|||
|
||||
/* ArenaCreate -- create the arena and call initializers */
|
||||
|
||||
ARG_DEFINE_KEY(ARENA_COMMIT_LIMIT, Size);
|
||||
ARG_DEFINE_KEY(ARENA_GRAIN_SIZE, Size);
|
||||
ARG_DEFINE_KEY(ARENA_SIZE, Size);
|
||||
ARG_DEFINE_KEY(ARENA_SPARE_COMMIT_LIMIT, Size);
|
||||
ARG_DEFINE_KEY(ARENA_ZONED, Bool);
|
||||
ARG_DEFINE_KEY(COMMIT_LIMIT, Size);
|
||||
ARG_DEFINE_KEY(SPARE_COMMIT_LIMIT, Size);
|
||||
|
||||
static Res arenaFreeLandInit(Arena arena)
|
||||
{
|
||||
|
|
@ -395,13 +395,13 @@ Res ArenaConfigure(Arena arena, ArgList args)
|
|||
AVERT(Arena, arena);
|
||||
AVERT(ArgList, args);
|
||||
|
||||
if (ArgPick(&arg, args, MPS_KEY_ARENA_COMMIT_LIMIT)) {
|
||||
if (ArgPick(&arg, args, MPS_KEY_COMMIT_LIMIT)) {
|
||||
Size limit = arg.val.size;
|
||||
res = ArenaSetCommitLimit(arena, limit);
|
||||
if (res != ResOK)
|
||||
return res;
|
||||
}
|
||||
if (ArgPick(&arg, args, MPS_KEY_ARENA_SPARE_COMMIT_LIMIT)) {
|
||||
if (ArgPick(&arg, args, MPS_KEY_SPARE_COMMIT_LIMIT)) {
|
||||
Size limit = arg.val.size;
|
||||
(void)ArenaSetSpareCommitLimit(arena, limit);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ static void runArenaTest(size_t size,
|
|||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SIZE, size);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_ZONED, FALSE);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_COMMIT_LIMIT, size - chunkSize);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_COMMIT_LIMIT, size - chunkSize);
|
||||
die(mps_arena_create_k(&arena, mps_arena_class_vm(), args),
|
||||
"mps_arena_create");
|
||||
} MPS_ARGS_END(args);
|
||||
|
|
|
|||
|
|
@ -155,18 +155,12 @@ extern const struct mps_key_s _mps_key_ARGS_END;
|
|||
#define MPS_KEY_ARGS_END (&_mps_key_ARGS_END)
|
||||
extern mps_arg_s mps_args_none[];
|
||||
|
||||
extern const struct mps_key_s _mps_key_ARENA_COMMIT_LIMIT;
|
||||
#define MPS_KEY_ARENA_COMMIT_LIMIT (&_mps_key_ARENA_COMMIT_LIMIT)
|
||||
#define MPS_KEY_ARENA_COMMIT_LIMIT_FIELD size
|
||||
extern const struct mps_key_s _mps_key_ARENA_GRAIN_SIZE;
|
||||
#define MPS_KEY_ARENA_GRAIN_SIZE (&_mps_key_ARENA_GRAIN_SIZE)
|
||||
#define MPS_KEY_ARENA_GRAIN_SIZE_FIELD size
|
||||
extern const struct mps_key_s _mps_key_ARENA_SIZE;
|
||||
#define MPS_KEY_ARENA_SIZE (&_mps_key_ARENA_SIZE)
|
||||
#define MPS_KEY_ARENA_SIZE_FIELD size
|
||||
extern const struct mps_key_s _mps_key_ARENA_SPARE_COMMIT_LIMIT;
|
||||
#define MPS_KEY_ARENA_SPARE_COMMIT_LIMIT (&_mps_key_ARENA_SPARE_COMMIT_LIMIT)
|
||||
#define MPS_KEY_ARENA_SPARE_COMMIT_LIMIT_FIELD size
|
||||
extern const struct mps_key_s _mps_key_ARENA_ZONED;
|
||||
#define MPS_KEY_ARENA_ZONED (&_mps_key_ARENA_ZONED)
|
||||
#define MPS_KEY_ARENA_ZONED_FIELD b
|
||||
|
|
@ -182,6 +176,12 @@ extern const struct mps_key_s _mps_key_GEN;
|
|||
extern const struct mps_key_s _mps_key_RANK;
|
||||
#define MPS_KEY_RANK (&_mps_key_RANK)
|
||||
#define MPS_KEY_RANK_FIELD rank
|
||||
extern const struct mps_key_s _mps_key_COMMIT_LIMIT;
|
||||
#define MPS_KEY_COMMIT_LIMIT (&_mps_key_COMMIT_LIMIT)
|
||||
#define MPS_KEY_COMMIT_LIMIT_FIELD size
|
||||
extern const struct mps_key_s _mps_key_SPARE_COMMIT_LIMIT;
|
||||
#define MPS_KEY_SPARE_COMMIT_LIMIT (&_mps_key_SPARE_COMMIT_LIMIT)
|
||||
#define MPS_KEY_SPARE_COMMIT_LIMIT_FIELD size
|
||||
|
||||
extern const struct mps_key_s _mps_key_EXTEND_BY;
|
||||
#define MPS_KEY_EXTEND_BY (&_mps_key_EXTEND_BY)
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ static void arena_commit_test(mps_arena_t arena)
|
|||
} while (res == MPS_RES_OK);
|
||||
die_expect(res, MPS_RES_COMMIT_LIMIT, "Commit limit allocation");
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_COMMIT_LIMIT, limit);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_COMMIT_LIMIT, limit);
|
||||
die(mps_arena_configure(arena, args), "commit_limit_set after");
|
||||
} MPS_ARGS_END(args);
|
||||
res = mps_alloc(&p, pool, FILLER_OBJECT_SIZE);
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ New features
|
|||
requests from the :term:`arena`.
|
||||
|
||||
#. The function :c:func:`mps_arena_create_k` accepts two new
|
||||
:term:`keyword arguments`. :c:macro:`MPS_KEY_ARENA_COMMIT_LIMIT`
|
||||
:term:`keyword arguments`. :c:macro:`MPS_KEY_COMMIT_LIMIT`
|
||||
sets the :term:`commit limit` for the arena, and
|
||||
:c:macro:`MPS_KEY_ARENA_SPARE_COMMIT_LIMIT` sets the :term:`spare
|
||||
:c:macro:`MPS_KEY_SPARE_COMMIT_LIMIT` sets the :term:`spare
|
||||
commit limit` for the arena.
|
||||
|
||||
#. The new function :c:func:`mps_arena_configure` provides a
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ Client arenas
|
|||
|
||||
It also accepts two optional keyword arguments:
|
||||
|
||||
* :c:macro:`MPS_KEY_ARENA_COMMIT_LIMIT` (type :c:type:`size_t`) is
|
||||
* :c:macro:`MPS_KEY_COMMIT_LIMIT` (type :c:type:`size_t`) is
|
||||
the maximum amount of memory, in :term:`bytes (1)`, that the MPS
|
||||
will use out of the provided chunk (or chunks, if the arena is
|
||||
extended). See :c:func:`mps_arena_commit_limit` for details. The
|
||||
|
|
@ -188,7 +188,7 @@ Client arenas
|
|||
|
||||
When configuring a client arena, :c:func:`mps_arena_configure`
|
||||
accepts the :term:`keyword argument`
|
||||
:c:macro:`MPS_KEY_ARENA_COMMIT_LIMIT` as described above.
|
||||
:c:macro:`MPS_KEY_COMMIT_LIMIT` as described above.
|
||||
|
||||
|
||||
.. c:function:: mps_res_t mps_arena_extend(mps_arena_t arena, mps_addr_t base, size_t size)
|
||||
|
|
@ -257,7 +257,7 @@ Virtual memory arenas
|
|||
more times it has to extend its address space, the less
|
||||
efficient garbage collection will become.
|
||||
|
||||
* :c:macro:`MPS_KEY_ARENA_COMMIT_LIMIT` (type :c:type:`size_t`) is
|
||||
* :c:macro:`MPS_KEY_COMMIT_LIMIT` (type :c:type:`size_t`) is
|
||||
the maximum amount of main memory, in :term:`bytes (1)`, that
|
||||
the MPS will obtain from the operating system. See
|
||||
:c:func:`mps_arena_commit_limit` for details. The default commit
|
||||
|
|
@ -274,7 +274,7 @@ Virtual memory arenas
|
|||
that's smaller than the operating system page size, the MPS
|
||||
rounds it up to the page size and continues.
|
||||
|
||||
* :c:macro:`MPS_KEY_ARENA_SPARE_COMMIT_LIMIT` (type
|
||||
* :c:macro:`MPS_KEY_SPARE_COMMIT_LIMIT` (type
|
||||
:c:type:`size_t`, default 0) is the spare commit limit in
|
||||
:term:`bytes (1)`. See :c:func:`mps_arena_spare_commit_limit`
|
||||
for details.
|
||||
|
|
@ -314,8 +314,8 @@ Virtual memory arenas
|
|||
|
||||
When configuring a virtual memory arena,
|
||||
:c:func:`mps_arena_configure` accepts the :term:`keyword
|
||||
arguments` :c:macro:`MPS_KEY_ARENA_COMMIT_LIMIT` and
|
||||
:c:macro:`MPS_KEY_ARENA_SPARE_COMMIT_LIMIT` as described above.
|
||||
arguments` :c:macro:`MPS_KEY_COMMIT_LIMIT` and
|
||||
:c:macro:`MPS_KEY_SPARE_COMMIT_LIMIT` as described above.
|
||||
|
||||
|
||||
.. index::
|
||||
|
|
@ -350,7 +350,7 @@ Arena properties
|
|||
virtual memory interface.
|
||||
|
||||
The commit limit can be changed by passing the
|
||||
:c:macro:`MPS_KEY_ARENA_COMMIT_LIMIT` :term:`keyword argument` to
|
||||
:c:macro:`MPS_KEY_COMMIT_LIMIT` :term:`keyword argument` to
|
||||
:c:func:`mps_arena_create_k` or :c:func:`mps_arena_configure`. The
|
||||
commit limit cannot be set to a value that is lower than the
|
||||
number of bytes that the MPS is using. If an attempt is made to
|
||||
|
|
@ -470,7 +470,7 @@ Arena properties
|
|||
the MPS is allowed to have.
|
||||
|
||||
The spare commit limit can be changed by passing the
|
||||
:c:macro:`MPS_KEY_ARENA_SPARE_COMMIT_LIMIT` :term:`keyword
|
||||
:c:macro:`MPS_KEY_SPARE_COMMIT_LIMIT` :term:`keyword
|
||||
argument` to :c:func:`mps_arena_create_k` or
|
||||
:c:func:`mps_arena_configure`. Setting it to a value lower than
|
||||
the current amount of spare committed memory causes spare
|
||||
|
|
@ -499,7 +499,7 @@ Arena properties
|
|||
:c:func:`mps_arena_commit_limit`.
|
||||
|
||||
The amount of "spare committed" memory can be limited passing the
|
||||
:c:macro:`MPS_KEY_ARENA_SPARE_COMMIT_LIMIT` :term:`keyword
|
||||
:c:macro:`MPS_KEY_SPARE_COMMIT_LIMIT` :term:`keyword
|
||||
argument` to :c:func:`mps_arena_create_k` or
|
||||
:c:func:`mps_arena_configure`. The value of the limit can be
|
||||
retrieved with :c:func:`mps_arena_spare_commit_limit`. This is
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ Deprecated in version 1.115
|
|||
|
||||
.. deprecated::
|
||||
|
||||
Pass the :c:macro:`MPS_KEY_ARENA_COMMIT_LIMIT` :term:`keyword
|
||||
Pass the :c:macro:`MPS_KEY_COMMIT_LIMIT` :term:`keyword
|
||||
argument` to :c:func:`mps_arena_create_k` or
|
||||
:c:func:`mps_arena_configure`.
|
||||
|
||||
|
|
|
|||
|
|
@ -82,45 +82,45 @@ now :c:macro:`MPS_KEY_ARGS_END`.
|
|||
The type of :term:`keyword argument` keys. Must take one of the
|
||||
following values:
|
||||
|
||||
=========================================== ========================================================= ==========================================================
|
||||
Keyword Type & field in ``arg.val`` See
|
||||
=========================================== ========================================================= ==========================================================
|
||||
:c:macro:`MPS_KEY_ARGS_END` *none* *see above*
|
||||
:c:macro:`MPS_KEY_ALIGN` :c:type:`mps_align_t` ``align`` :c:func:`mps_class_mv`, :c:func:`mps_class_mvff`, :c:func:`mps_class_mvt`
|
||||
:c:macro:`MPS_KEY_AMS_SUPPORT_AMBIGUOUS` :c:type:`mps_bool_t` ``b`` :c:func:`mps_class_ams`
|
||||
:c:macro:`MPS_KEY_ARENA_CL_BASE` :c:type:`mps_addr_t` ``addr`` :c:func:`mps_arena_class_cl`
|
||||
:c:macro:`MPS_KEY_ARENA_COMMIT_LIMIT` :c:type:`size_t` ``size`` :c:func:`mps_arena_class_vm`, :c:func:`mps_arena_class_cl`
|
||||
:c:macro:`MPS_KEY_ARENA_GRAIN_SIZE` :c:type:`size_t` ``size`` :c:func:`mps_arena_class_vm`, :c:func:`mps_arena_class_cl`
|
||||
:c:macro:`MPS_KEY_ARENA_SIZE` :c:type:`size_t` ``size`` :c:func:`mps_arena_class_vm`, :c:func:`mps_arena_class_cl`
|
||||
:c:macro:`MPS_KEY_ARENA_SPARE_COMMIT_LIMIT` :c:type:`size_t` ``size`` :c:func:`mps_arena_class_vm`, :c:func:`mps_arena_class_cl`
|
||||
:c:macro:`MPS_KEY_AWL_FIND_DEPENDENT` ``void *(*)(void *)`` ``addr_method`` :c:func:`mps_class_awl`
|
||||
:c:macro:`MPS_KEY_CHAIN` :c:type:`mps_chain_t` ``chain`` :c:func:`mps_class_amc`, :c:func:`mps_class_amcz`, :c:func:`mps_class_ams`, :c:func:`mps_class_awl`, :c:func:`mps_class_lo`
|
||||
:c:macro:`MPS_KEY_EXTEND_BY` :c:type:`size_t` ``size`` :c:func:`mps_class_amc`, :c:func:`mps_class_amcz`, :c:func:`mps_class_mfs`, :c:func:`mps_class_mv`, :c:func:`mps_class_mvff`
|
||||
:c:macro:`MPS_KEY_FMT_ALIGN` :c:type:`mps_align_t` ``align`` :c:func:`mps_fmt_create_k`
|
||||
:c:macro:`MPS_KEY_FMT_CLASS` :c:type:`mps_fmt_class_t` ``fmt_class`` :c:func:`mps_fmt_create_k`
|
||||
:c:macro:`MPS_KEY_FMT_FWD` :c:type:`mps_fmt_fwd_t` ``fmt_fwd`` :c:func:`mps_fmt_create_k`
|
||||
:c:macro:`MPS_KEY_FMT_HEADER_SIZE` :c:type:`size_t` ``size`` :c:func:`mps_fmt_create_k`
|
||||
:c:macro:`MPS_KEY_FMT_ISFWD` :c:type:`mps_fmt_isfwd_t` ``fmt_isfwd`` :c:func:`mps_fmt_create_k`
|
||||
:c:macro:`MPS_KEY_FMT_PAD` :c:type:`mps_fmt_pad_t` ``fmt_pad`` :c:func:`mps_fmt_create_k`
|
||||
:c:macro:`MPS_KEY_FMT_SCAN` :c:type:`mps_fmt_scan_t` ``fmt_scan`` :c:func:`mps_fmt_create_k`
|
||||
:c:macro:`MPS_KEY_FMT_SKIP` :c:type:`mps_fmt_skip_t` ``fmt_skip`` :c:func:`mps_fmt_create_k`
|
||||
:c:macro:`MPS_KEY_FORMAT` :c:type:`mps_fmt_t` ``format`` :c:func:`mps_class_amc`, :c:func:`mps_class_amcz`, :c:func:`mps_class_ams`, :c:func:`mps_class_awl`, :c:func:`mps_class_lo` , :c:func:`mps_class_snc`
|
||||
:c:macro:`MPS_KEY_GEN` :c:type:`unsigned` ``u`` :c:func:`mps_class_ams`, :c:func:`mps_class_awl`, :c:func:`mps_class_lo`
|
||||
:c:macro:`MPS_KEY_INTERIOR` :c:type:`mps_bool_t` ``b`` :c:func:`mps_class_amc`, :c:func:`mps_class_amcz`
|
||||
:c:macro:`MPS_KEY_MAX_SIZE` :c:type:`size_t` ``size`` :c:func:`mps_class_mv`
|
||||
:c:macro:`MPS_KEY_MEAN_SIZE` :c:type:`size_t` ``size`` :c:func:`mps_class_mv`, :c:func:`mps_class_mvt`, :c:func:`mps_class_mvff`
|
||||
:c:macro:`MPS_KEY_MFS_UNIT_SIZE` :c:type:`size_t` ``size`` :c:func:`mps_class_mfs`
|
||||
:c:macro:`MPS_KEY_MIN_SIZE` :c:type:`size_t` ``size`` :c:func:`mps_class_mvt`
|
||||
:c:macro:`MPS_KEY_MVFF_ARENA_HIGH` :c:type:`mps_bool_t` ``b`` :c:func:`mps_class_mvff`
|
||||
:c:macro:`MPS_KEY_MVFF_FIRST_FIT` :c:type:`mps_bool_t` ``b`` :c:func:`mps_class_mvff`
|
||||
:c:macro:`MPS_KEY_MVFF_SLOT_HIGH` :c:type:`mps_bool_t` ``b`` :c:func:`mps_class_mvff`
|
||||
:c:macro:`MPS_KEY_MVT_FRAG_LIMIT` :c:type:`mps_word_t` ``count`` :c:func:`mps_class_mvt`
|
||||
:c:macro:`MPS_KEY_MVT_RESERVE_DEPTH` :c:type:`mps_word_t` ``count`` :c:func:`mps_class_mvt`
|
||||
:c:macro:`MPS_KEY_POOL_DEBUG_OPTIONS` :c:type:`mps_pool_debug_option_s` ``*pool_debug_options`` :c:func:`mps_class_ams_debug`, :c:func:`mps_class_mv_debug`, :c:func:`mps_class_mvff_debug`
|
||||
:c:macro:`MPS_KEY_RANK` :c:type:`mps_rank_t` ``rank`` :c:func:`mps_class_ams`, :c:func:`mps_class_awl`, :c:func:`mps_class_snc`
|
||||
:c:macro:`MPS_KEY_SPARE` :c:type:`double` ``d`` :c:func:`mps_class_mvff`
|
||||
:c:macro:`MPS_KEY_VMW3_TOP_DOWN` :c:type:`mps_bool_t` ``b`` :c:func:`mps_arena_class_vm`
|
||||
=========================================== ========================================================= ==========================================================
|
||||
======================================== ========================================================= ==========================================================
|
||||
Keyword Type & field in ``arg.val`` See
|
||||
======================================== ========================================================= ==========================================================
|
||||
:c:macro:`MPS_KEY_ARGS_END` *none* *see above*
|
||||
:c:macro:`MPS_KEY_ALIGN` :c:type:`mps_align_t` ``align`` :c:func:`mps_class_mv`, :c:func:`mps_class_mvff`, :c:func:`mps_class_mvt`
|
||||
:c:macro:`MPS_KEY_AMS_SUPPORT_AMBIGUOUS` :c:type:`mps_bool_t` ``b`` :c:func:`mps_class_ams`
|
||||
:c:macro:`MPS_KEY_ARENA_CL_BASE` :c:type:`mps_addr_t` ``addr`` :c:func:`mps_arena_class_cl`
|
||||
:c:macro:`MPS_KEY_COMMIT_LIMIT` :c:type:`size_t` ``size`` :c:func:`mps_arena_class_vm`, :c:func:`mps_arena_class_cl`
|
||||
:c:macro:`MPS_KEY_ARENA_GRAIN_SIZE` :c:type:`size_t` ``size`` :c:func:`mps_arena_class_vm`, :c:func:`mps_arena_class_cl`
|
||||
:c:macro:`MPS_KEY_ARENA_SIZE` :c:type:`size_t` ``size`` :c:func:`mps_arena_class_vm`, :c:func:`mps_arena_class_cl`
|
||||
:c:macro:`MPS_KEY_SPARE_COMMIT_LIMIT` :c:type:`size_t` ``size`` :c:func:`mps_arena_class_vm`, :c:func:`mps_arena_class_cl`
|
||||
:c:macro:`MPS_KEY_AWL_FIND_DEPENDENT` ``void *(*)(void *)`` ``addr_method`` :c:func:`mps_class_awl`
|
||||
:c:macro:`MPS_KEY_CHAIN` :c:type:`mps_chain_t` ``chain`` :c:func:`mps_class_amc`, :c:func:`mps_class_amcz`, :c:func:`mps_class_ams`, :c:func:`mps_class_awl`, :c:func:`mps_class_lo`
|
||||
:c:macro:`MPS_KEY_EXTEND_BY` :c:type:`size_t` ``size`` :c:func:`mps_class_amc`, :c:func:`mps_class_amcz`, :c:func:`mps_class_mfs`, :c:func:`mps_class_mv`, :c:func:`mps_class_mvff`
|
||||
:c:macro:`MPS_KEY_FMT_ALIGN` :c:type:`mps_align_t` ``align`` :c:func:`mps_fmt_create_k`
|
||||
:c:macro:`MPS_KEY_FMT_CLASS` :c:type:`mps_fmt_class_t` ``fmt_class`` :c:func:`mps_fmt_create_k`
|
||||
:c:macro:`MPS_KEY_FMT_FWD` :c:type:`mps_fmt_fwd_t` ``fmt_fwd`` :c:func:`mps_fmt_create_k`
|
||||
:c:macro:`MPS_KEY_FMT_HEADER_SIZE` :c:type:`size_t` ``size`` :c:func:`mps_fmt_create_k`
|
||||
:c:macro:`MPS_KEY_FMT_ISFWD` :c:type:`mps_fmt_isfwd_t` ``fmt_isfwd`` :c:func:`mps_fmt_create_k`
|
||||
:c:macro:`MPS_KEY_FMT_PAD` :c:type:`mps_fmt_pad_t` ``fmt_pad`` :c:func:`mps_fmt_create_k`
|
||||
:c:macro:`MPS_KEY_FMT_SCAN` :c:type:`mps_fmt_scan_t` ``fmt_scan`` :c:func:`mps_fmt_create_k`
|
||||
:c:macro:`MPS_KEY_FMT_SKIP` :c:type:`mps_fmt_skip_t` ``fmt_skip`` :c:func:`mps_fmt_create_k`
|
||||
:c:macro:`MPS_KEY_FORMAT` :c:type:`mps_fmt_t` ``format`` :c:func:`mps_class_amc`, :c:func:`mps_class_amcz`, :c:func:`mps_class_ams`, :c:func:`mps_class_awl`, :c:func:`mps_class_lo` , :c:func:`mps_class_snc`
|
||||
:c:macro:`MPS_KEY_GEN` :c:type:`unsigned` ``u`` :c:func:`mps_class_ams`, :c:func:`mps_class_awl`, :c:func:`mps_class_lo`
|
||||
:c:macro:`MPS_KEY_INTERIOR` :c:type:`mps_bool_t` ``b`` :c:func:`mps_class_amc`, :c:func:`mps_class_amcz`
|
||||
:c:macro:`MPS_KEY_MAX_SIZE` :c:type:`size_t` ``size`` :c:func:`mps_class_mv`
|
||||
:c:macro:`MPS_KEY_MEAN_SIZE` :c:type:`size_t` ``size`` :c:func:`mps_class_mv`, :c:func:`mps_class_mvt`, :c:func:`mps_class_mvff`
|
||||
:c:macro:`MPS_KEY_MFS_UNIT_SIZE` :c:type:`size_t` ``size`` :c:func:`mps_class_mfs`
|
||||
:c:macro:`MPS_KEY_MIN_SIZE` :c:type:`size_t` ``size`` :c:func:`mps_class_mvt`
|
||||
:c:macro:`MPS_KEY_MVFF_ARENA_HIGH` :c:type:`mps_bool_t` ``b`` :c:func:`mps_class_mvff`
|
||||
:c:macro:`MPS_KEY_MVFF_FIRST_FIT` :c:type:`mps_bool_t` ``b`` :c:func:`mps_class_mvff`
|
||||
:c:macro:`MPS_KEY_MVFF_SLOT_HIGH` :c:type:`mps_bool_t` ``b`` :c:func:`mps_class_mvff`
|
||||
:c:macro:`MPS_KEY_MVT_FRAG_LIMIT` :c:type:`mps_word_t` ``count`` :c:func:`mps_class_mvt`
|
||||
:c:macro:`MPS_KEY_MVT_RESERVE_DEPTH` :c:type:`mps_word_t` ``count`` :c:func:`mps_class_mvt`
|
||||
:c:macro:`MPS_KEY_POOL_DEBUG_OPTIONS` :c:type:`mps_pool_debug_option_s` ``*pool_debug_options`` :c:func:`mps_class_ams_debug`, :c:func:`mps_class_mv_debug`, :c:func:`mps_class_mvff_debug`
|
||||
:c:macro:`MPS_KEY_RANK` :c:type:`mps_rank_t` ``rank`` :c:func:`mps_class_ams`, :c:func:`mps_class_awl`, :c:func:`mps_class_snc`
|
||||
:c:macro:`MPS_KEY_SPARE` :c:type:`double` ``d`` :c:func:`mps_class_mvff`
|
||||
:c:macro:`MPS_KEY_VMW3_TOP_DOWN` :c:type:`mps_bool_t` ``b`` :c:func:`mps_arena_class_vm`
|
||||
======================================== ========================================================= ==========================================================
|
||||
|
||||
|
||||
.. c:function:: MPS_ARGS_BEGIN(args)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ static void test(void) {
|
|||
* RES_COMMIT_LIMIT. */
|
||||
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_COMMIT_LIMIT, 16 * 1024);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_COMMIT_LIMIT, 16 * 1024);
|
||||
report_res("create", mps_arena_create_k(&arena, mps_arena_class_vm(), args));
|
||||
} MPS_ARGS_END(args);
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ static void test(void)
|
|||
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SIZE, 1024*1024*40);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_COMMIT_LIMIT, 1024ul*1024ul*100ul);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_COMMIT_LIMIT, 1024ul*1024ul*100ul);
|
||||
cdie(mps_arena_create_k(&arena, mps_arena_class_vm(), args),
|
||||
"create arena");
|
||||
} MPS_ARGS_END(args);
|
||||
|
|
@ -60,7 +60,7 @@ static void test(void)
|
|||
/* Set the spare commit limit to 0MB */
|
||||
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SPARE_COMMIT_LIMIT, 0);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_SPARE_COMMIT_LIMIT, 0);
|
||||
cdie(mps_arena_configure(arena, args), "mps_arena_configure");
|
||||
} MPS_ARGS_END(args);
|
||||
die(mps_alloc(&objs[0], pool, BIGSIZE), "alloc");
|
||||
|
|
@ -75,7 +75,7 @@ static void test(void)
|
|||
|
||||
/* nb. size_t unsigned, therefore (size_t)-1 is the maximum limit */
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SPARE_COMMIT_LIMIT, -1);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_SPARE_COMMIT_LIMIT, -1);
|
||||
cdie(mps_arena_configure(arena, args), "mps_arena_configure");
|
||||
} MPS_ARGS_END(args);
|
||||
die(mps_alloc(&objs[0], pool, BIGSIZE), "alloc");
|
||||
|
|
@ -88,7 +88,7 @@ static void test(void)
|
|||
|
||||
/* Reducing the spare committed limit should return most of the spare */
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SPARE_COMMIT_LIMIT, 1024*1024);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_SPARE_COMMIT_LIMIT, 1024*1024);
|
||||
cdie(mps_arena_configure(arena, args), "mps_arena_configure");
|
||||
} MPS_ARGS_END(args);
|
||||
com2 = mps_arena_committed(arena);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ static void test(void)
|
|||
mps_arena_t arena;
|
||||
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_COMMIT_LIMIT, 16 * 1024);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_COMMIT_LIMIT, 16 * 1024);
|
||||
report_res("create1",
|
||||
mps_arena_create_k(&arena, mps_arena_class_vm(), args));
|
||||
} MPS_ARGS_END(args);
|
||||
|
|
@ -28,7 +28,7 @@ static void test(void)
|
|||
mps_arena_create_k(&arena, mps_arena_class_vm(), mps_args_none));
|
||||
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_COMMIT_LIMIT, 16 * 1024);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_COMMIT_LIMIT, 16 * 1024);
|
||||
report_res("configure", mps_arena_configure(arena, args));
|
||||
} MPS_ARGS_END(args);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue