mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 16:51:06 -07:00
Make keyword mps_key_ams_support_ambiguous optional, with default value false. update documentation accordingly.
Copied from Perforce Change: 183513 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
ecd974df8f
commit
b5004beb4b
3 changed files with 23 additions and 10 deletions
|
|
@ -236,6 +236,11 @@
|
|||
#define FMT_CLASS_DEFAULT (&FormatDefaultClass)
|
||||
|
||||
|
||||
/* Pool AMS Configuration -- see <code/poolams.c> */
|
||||
|
||||
#define AMS_SUPPORT_AMBIGUOUS_DEFAULT FALSE
|
||||
|
||||
|
||||
/* Pool MV Configuration -- see <code/poolmv.c> */
|
||||
|
||||
#define MV_EXTEND_BY_DEFAULT ((Size)65536)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* poolams.c: AUTOMATIC MARK & SWEEP POOL CLASS
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (c) 2002 Global Graphics Software.
|
||||
*
|
||||
*
|
||||
|
|
@ -763,7 +763,7 @@ static Res AMSInit(Pool pool, ArgList args)
|
|||
Res res;
|
||||
Format format;
|
||||
Chain chain;
|
||||
Bool supportAmbiguous;
|
||||
Bool supportAmbiguous = AMS_SUPPORT_AMBIGUOUS_DEFAULT;
|
||||
ArgStruct arg;
|
||||
|
||||
AVERT(Pool, pool);
|
||||
|
|
@ -773,8 +773,8 @@ static Res AMSInit(Pool pool, ArgList args)
|
|||
chain = arg.val.chain;
|
||||
ArgRequire(&arg, args, MPS_KEY_FORMAT);
|
||||
format = arg.val.format;
|
||||
ArgRequire(&arg, args, MPS_KEY_AMS_SUPPORT_AMBIGUOUS);
|
||||
supportAmbiguous = arg.val.b;
|
||||
if (ArgPick(&arg, args, MPS_KEY_AMS_SUPPORT_AMBIGUOUS))
|
||||
supportAmbiguous = arg.val.b;
|
||||
|
||||
/* .ambiguous.noshare: If the pool is required to support ambiguous */
|
||||
/* references, the alloc and white tables cannot be shared. */
|
||||
|
|
@ -1741,7 +1741,7 @@ Bool AMSCheck(AMS ams)
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (C) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -57,9 +57,10 @@ AMS properties
|
|||
:ref:`topic-collection-schedule`.
|
||||
|
||||
* Blocks may contain :term:`exact references` to blocks in the same or
|
||||
other pools (but may not contain :term:`ambiguous references` or
|
||||
:term:`weak references (1)`, and may not use :term:`remote
|
||||
references`).
|
||||
other pools, or :term:`ambiguous references` (if the
|
||||
:c:macro:`MPS_KEY_AMS_SUPPORT_AMBIGUOUS` keyword argument is set to
|
||||
true when creating the pool). Blocks may not contain :term:`weak
|
||||
references (1)`, and may not use :term:`remote references`.
|
||||
|
||||
* Allocations may be variable in size.
|
||||
|
||||
|
|
@ -115,11 +116,16 @@ AMS interface
|
|||
the :term:`generation chain` for the pool. It must have a single
|
||||
generation.
|
||||
|
||||
* :c:macro:`MPS_KEY_AMS_SUPPORT_AMBIGUOUS` (type
|
||||
:c:type:`mps_bool_t`, default false) specifies whether references
|
||||
may be ambiguous.
|
||||
|
||||
For example::
|
||||
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_CHAIN, chain);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_FORMAT, fmt);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_AMS_SUPPORT_AMBIGUOUS, 1);
|
||||
MPS_ARGS_DONE(args);
|
||||
res = mps_pool_create_k(&pool, arena, mps_class_ams(), args);
|
||||
} MPS_ARGS_END(args);
|
||||
|
|
@ -132,7 +138,8 @@ AMS interface
|
|||
mps_res_t mps_pool_create(mps_pool_t *pool_o, mps_arena_t arena,
|
||||
mps_class_t mps_class_ams(),
|
||||
mps_fmt_t fmt,
|
||||
mps_chain_t chain)
|
||||
mps_chain_t chain,
|
||||
mps_bool_t support_ambiguous)
|
||||
|
||||
|
||||
.. c:function:: mps_class_t mps_class_ams_debug(void)
|
||||
|
|
@ -155,4 +162,5 @@ AMS interface
|
|||
mps_class_t mps_class_ams_debug(),
|
||||
mps_debug_option_s debug_option,
|
||||
mps_fmt_t fmt,
|
||||
mps_chain_t chain)
|
||||
mps_chain_t chain,
|
||||
mps_bool_t support_ambiguous)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue