1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-06 07:31:13 -08:00
Copied from Perforce
 Change: 186537
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2014-06-12 16:24:39 +01:00
parent b0d4fb39be
commit 00a5b8e436
6 changed files with 21 additions and 43 deletions

View file

@ -156,13 +156,12 @@ typedef const struct SrcIdStruct {
*
* Use these values for unused pointer, size closure arguments and
* check them in the callback or visitor.
*
* We use PointerAdd rather than a cast to avoid "warning C4306: 'type
* cast' : conversion from 'unsigned int' to 'Pointer' of greater
* size" on platform w3i6mv.
*
* Ensure that they have high bits set on 64-bit platforms for maximum
* unusability.
*/
#define UNUSED_POINTER PointerAdd(0, 0xB60405ED) /* PointeR UNUSED */
#define UNUSED_SIZE ((Size)0x520405ED) /* SiZe UNUSED */
#define UNUSED_POINTER (Pointer)((Word)~0xFFFFFFFF | (Word)0xB60405ED) /* PointeR UNUSED */
#define UNUSED_SIZE ((Size)~0xFFFFFFFF | (Size)0x520405ED) /* SiZe UNUSED */
/* PARENT -- parent structure

View file

@ -9,8 +9,9 @@
#include "mps.h"
#define mps_mv_free_size(pool) (mps_pool_free_size(pool))
#define mps_mv_size(pool) (mps_pool_total_size(pool))
#define mps_mv_free_size mps_pool_free_size
#define mps_mv_size mps_pool_total_size
extern mps_class_t mps_class_mv(void);
extern mps_class_t mps_class_mv_debug(void);

View file

@ -1,27 +1,24 @@
/* mpscmv2.h: MEMORY POOL SYSTEM CLASS "MVT"
*
* $Id$
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
*
* The MVT pool class used to be known as "MV2" in some places: this
* header provides backwards compatibility for prograns that included
* it under its old name.
*/
#ifndef mpscmv2_h
#define mpscmv2_h
#include "mps.h"
extern mps_class_t mps_class_mvt(void);
/* The mvt pool class supports two extensions to the pool protocol:
size and free_size. */
extern size_t mps_mvt_free_size(mps_pool_t mps_pool);
extern size_t mps_mvt_size(mps_pool_t mps_pool);
#include "mpscmvt.h"
#endif /* mpscmv2_h */
/* C. COPYRIGHT AND LICENSE
*
* Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>.
* Copyright (C) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
* All rights reserved. This is an open source license. Contact
* Ravenbrook for commercial licensing options.
*

View file

@ -19,8 +19,9 @@ extern const struct mps_key_s _mps_key_mvff_first_fit;
#define MPS_KEY_MVFF_FIRST_FIT (&_mps_key_mvff_first_fit)
#define MPS_KEY_MVFF_FIRST_FIT_FIELD b
#define mps_mvff_free_size(pool) (mps_pool_free_size(pool))
#define mps_mvff_size(pool) (mps_pool_total_size(pool))
#define mps_mvff_free_size mps_pool_free_size
#define mps_mvff_size mps_pool_total_size
extern mps_class_t mps_class_mvff(void);
extern mps_class_t mps_class_mvff_debug(void);

View file

@ -16,30 +16,10 @@ extern const struct mps_key_s _mps_key_mvt_frag_limit;
#define MPS_KEY_MVT_FRAG_LIMIT (&_mps_key_mvt_frag_limit)
#define MPS_KEY_MVT_FRAG_LIMIT_FIELD d
/* The mvt pool class has five extra parameters to mps_pool_create:
* mps_res_t mps_pool_create(mps_pool_t * pool, mps_arena_t arena,
* mps_class_t mvt_class,
* size_t minimum_size,
* size_t mean_size,
* size_t maximum_size,
* mps_count_t reserve_depth
* mps_count_t fragmentation_limit);
* minimum_, mean_, and maximum_size are the mimimum, mean, and
* maximum (typical) size of objects expected to be allocated in the
* pool. reserve_depth is a measure of the expected hysteresis of the
* object population. fragmentation_limit is a percentage (between 0
* and 100): if the free space managed by the pool exceeds the
* specified percentage, the pool will resort to a "first fit"
* allocation policy.
*/
extern mps_class_t mps_class_mvt(void);
/* The mvt pool class formerly supported two extensions to the pool
protocol: size and free_size. These are deprecated in favour of the
generic pool function. */
#define mps_mvt_free_size(pool) (mps_pool_free_size(pool))
#define mps_mvt_size(pool) (mps_pool_total_size(pool))
#define mps_mvt_free_size mps_pool_free_size
#define mps_mvt_size mps_pool_total_size
#endif /* mpscmvt_h */

View file

@ -681,7 +681,7 @@ Size PoolNoSize(Pool pool)
{
AVERT(Pool, pool);
NOTREACHED;
return 0;
return UNUSED_SIZE;
}