- and various changes for Mule, for 19.12.
- Added bit vectors for 19.13.
+ and various changes for Mule, for 19.12.
+ Added bit vectors for 19.13.
#define ALLOCATE_FIXED_TYPE(type, structtype, result) \
do { \
result = xnew(structtype); \
#define ALLOCATE_FIXED_TYPE(type, structtype, result) \
do { \
result = xnew(structtype); \
INCREMENT_CONS_COUNTER(sizeof(structtype), #type); \
} while (0)
#define ALLOCATE_ATOMIC_FIXED_TYPE(type, structtype, result) \
do { \
result = xnew_atomic(structtype); \
INCREMENT_CONS_COUNTER(sizeof(structtype), #type); \
} while (0)
#define ALLOCATE_ATOMIC_FIXED_TYPE(type, structtype, result) \
do { \
result = xnew_atomic(structtype); \
/************************************************************************/
/* Float allocation */
/************************************************************************/
/************************************************************************/
/* Float allocation */
/************************************************************************/
return make_indef(POS_INFINITY);
else if (ENT_FLOAT_NINF_P(float_value))
return make_indef(NEG_INFINITY);
return make_indef(POS_INFINITY);
else if (ENT_FLOAT_NINF_P(float_value))
return make_indef(NEG_INFINITY);
return make_indef(NOT_A_NUMBER);
ALLOCATE_FIXED_TYPE(float, Lisp_Float, f);
return make_indef(NOT_A_NUMBER);
ALLOCATE_FIXED_TYPE(float, Lisp_Float, f);
ALLOCATE_FIXED_TYPE(bigz, Lisp_Bigz, b);
bigz_register_finaliser(b);
ALLOCATE_FIXED_TYPE(bigz, Lisp_Bigz, b);
bigz_register_finaliser(b);
/*** Big complex numbers with correct rounding ***/
#if defined HAVE_MPC && defined WITH_MPC || \
defined HAVE_PSEUC && defined WITH_PSEUC
/*** Big complex numbers with correct rounding ***/
#if defined HAVE_MPC && defined WITH_MPC || \
defined HAVE_PSEUC && defined WITH_PSEUC
DECLARE_FIXED_TYPE_ALLOC(bigc, Lisp_Bigc);
#define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_bigc 250
DECLARE_FIXED_TYPE_ALLOC(bigc, Lisp_Bigc);
#define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_bigc 250
set_lheader_implementation(&s->lheader, &lrecord_string);
string_register_finaliser(s);
set_lheader_implementation(&s->lheader, &lrecord_string);
string_register_finaliser(s);
- Bufbyte *foo = xnew_atomic_array(Bufbyte, length+1);
- set_string_data(s, foo);
- }
+ Bufbyte *foo = NULL;
+#if defined HAVE_BDWGC && defined EF_USE_BDWGC
+ foo = xnew_atomic_array(Bufbyte, length+1);
+ assert(foo != NULL);
- set_string_data(s, BIG_STRING_FULLSIZE_P(fullsize)
- ? xnew_atomic_array(Bufbyte, length + 1)
- : allocate_string_chars_struct(s, fullsize)->chars);
+ if (BIG_STRING_FULLSIZE_P(fullsize)) {
+ foo = xnew_atomic_array(Bufbyte, length + 1);
+ assert(foo != NULL);
+ } else {
+ foo = allocate_string_chars_struct(s, fullsize)->chars;
+ assert(foo != NULL);
+ }
4) Calling free_managed_lcrecord() is just like kissing the
lcrecord goodbye as if it were garbage-collected. This means:
-- the contents of the freed lcrecord are undefined, and the
4) Calling free_managed_lcrecord() is just like kissing the
lcrecord goodbye as if it were garbage-collected. This means:
-- the contents of the freed lcrecord are undefined, and the
are undefined, just like for alloc_lcrecord().
-- the mark method for the lcrecord's type will *NEVER* be called
are undefined, just like for alloc_lcrecord().
-- the mark method for the lcrecord's type will *NEVER* be called
{
#define UNMARK_bigq(ptr) UNMARK_RECORD_HEADER(&((ptr)->lheader))
#define ADDITIONAL_FREE_bigq(ptr) bigq_fini(ptr->data)
{
#define UNMARK_bigq(ptr) UNMARK_RECORD_HEADER(&((ptr)->lheader))
#define ADDITIONAL_FREE_bigq(ptr) bigq_fini(ptr->data)
{
#define UNMARK_bigf(ptr) UNMARK_RECORD_HEADER(&((ptr)->lheader))
#define ADDITIONAL_FREE_bigf(ptr) bigf_fini(ptr->data)
{
#define UNMARK_bigf(ptr) UNMARK_RECORD_HEADER(&((ptr)->lheader))
#define ADDITIONAL_FREE_bigf(ptr) bigf_fini(ptr->data)
{
#define UNMARK_bigfr(ptr) UNMARK_RECORD_HEADER(&((ptr)->lheader))
#define ADDITIONAL_FREE_bigfr(ptr) bigfr_fini(ptr->data)
{
#define UNMARK_bigfr(ptr) UNMARK_RECORD_HEADER(&((ptr)->lheader))
#define ADDITIONAL_FREE_bigfr(ptr) bigfr_fini(ptr->data)
{
#define UNMARK_bigg(ptr) UNMARK_RECORD_HEADER(&((ptr)->lheader))
#define ADDITIONAL_FREE_bigg(ptr) bigg_fini(ptr->data)
{
#define UNMARK_bigg(ptr) UNMARK_RECORD_HEADER(&((ptr)->lheader))
#define ADDITIONAL_FREE_bigg(ptr) bigg_fini(ptr->data)
{
#define UNMARK_bigc(ptr) UNMARK_RECORD_HEADER(&((ptr)->lheader))
#define ADDITIONAL_FREE_bigc(ptr) bigc_fini(ptr->data)
{
#define UNMARK_bigc(ptr) UNMARK_RECORD_HEADER(&((ptr)->lheader))
#define ADDITIONAL_FREE_bigc(ptr) bigc_fini(ptr->data)
{
#define UNMARK_quatern(ptr) UNMARK_RECORD_HEADER(&((ptr)->lheader))
#define ADDITIONAL_FREE_quatern(ptr) quatern_fini(ptr->data)
{
#define UNMARK_quatern(ptr) UNMARK_RECORD_HEADER(&((ptr)->lheader))
#define ADDITIONAL_FREE_quatern(ptr) quatern_fini(ptr->data)
SWEEP_FIXED_TYPE_BLOCK(quatern, Lisp_Quatern);
}
#endif /* HAVE_QUATERN */
SWEEP_FIXED_TYPE_BLOCK(quatern, Lisp_Quatern);
}
#endif /* HAVE_QUATERN */
/* Okay, simple pluralization check for
`symbol-value-varalias' */
if (name[len - 1] == 's')
/* Okay, simple pluralization check for
`symbol-value-varalias' */
if (name[len - 1] == 's')
- sz = snprintf(buf, sizeof(buf), "%ses-freed", name);
+ sz = snprintf(buf, sizeof(buf), "%ses-freed", name);
else
sz = snprintf(buf, sizeof(buf), "%ss-freed", name);
assert(sz >=0 && (size_t)sz < sizeof(buf));
else
sz = snprintf(buf, sizeof(buf), "%ss-freed", name);
assert(sz >=0 && (size_t)sz < sizeof(buf));
2. When using the new allocator (gmalloc.c):
-- blocks are always allocated in chunks of powers of two up
2. When using the new allocator (gmalloc.c):
-- blocks are always allocated in chunks of powers of two up
is defined. There is no per-block overhead, but there
is an overhead of 3*sizeof (size_t) for each 4096 bytes
allocated.
is defined. There is no per-block overhead, but there
is an overhead of 3*sizeof (size_t) for each 4096 bytes
allocated.
XSETINT(all_bit_vectors, 0); /* Qzero may not be set yet. */
XSETINT(Vgc_message, 0);
#if !defined HAVE_BDWGC || !defined EF_USE_BDWGC
XSETINT(all_bit_vectors, 0); /* Qzero may not be set yet. */
XSETINT(Vgc_message, 0);
#if !defined HAVE_BDWGC || !defined EF_USE_BDWGC