comparison src/alloc.c @ 3017:1e7cc382eb16

[xemacs-hg @ 2005-10-24 10:07:26 by ben] refactor mc-alloc dependencies next-error.el, occur.el: Fix some byte-compile warnings. alloc.c, buffer.c, buffer.h, casetab.c, casetab.h, charset.h, chartab.c, chartab.h, console-impl.h, console-msw-impl.h, console.c, data.c, database.c, device-impl.h, device-msw.c, device.c, dialog-msw.c, elhash.c, events.h, extents-impl.h, extents.c, faces.c, faces.h, file-coding.c, file-coding.h, frame-impl.h, frame.c, glyphs.c, glyphs.h, gui.c, gui.h, keymap.c, lisp.h, lrecord.h, lstream.c, lstream.h, mule-charset.c, objects-impl.h, objects.c, opaque.c, opaque.h, print.c, process.c, procimpl.h, rangetab.c, rangetab.h, scrollbar-gtk.c, scrollbar-msw.c, scrollbar-x.c, scrollbar.c, scrollbar.h, specifier.c, specifier.h, symbols.c, symeval.h, toolbar.c, toolbar.h, tooltalk.c, ui-gtk.c, ui-gtk.h, unicode.c, window-impl.h, window.c: Eliminate the majority of #ifdef MC_ALLOC occurrences through macros LCRECORD_HEADER, ALLOC_LCRECORD_TYPE, MALLOCED_STORAGE_SIZE, etc. (defined in lrecord.h).
author ben
date Mon, 24 Oct 2005 10:07:42 +0000
parents ec5f23ea6d2e
children b7f26b2f78bd
comparison
equal deleted inserted replaced
3016:f252275fb013 3017:1e7cc382eb16
809 { 809 {
810 return EQ (obj1, obj2); 810 return EQ (obj1, obj2);
811 } 811 }
812 812
813 813
814 #ifndef MC_ALLOC 814 #ifdef MC_ALLOC
815 #define DECLARE_FIXED_TYPE_ALLOC(type, structture) struct __foo__
816 #else
815 /************************************************************************/ 817 /************************************************************************/
816 /* Fixed-size type macros */ 818 /* Fixed-size type macros */
817 /************************************************************************/ 819 /************************************************************************/
818 820
819 /* For fixed-size types that are commonly used, we malloc() large blocks 821 /* For fixed-size types that are commonly used, we malloc() large blocks
1083 { \ 1085 { \
1084 ALLOCATE_FIXED_TYPE_1 (type, structtype, result); \ 1086 ALLOCATE_FIXED_TYPE_1 (type, structtype, result); \
1085 NOSEEUM_INCREMENT_CONS_COUNTER (sizeof (structtype), #type); \ 1087 NOSEEUM_INCREMENT_CONS_COUNTER (sizeof (structtype), #type); \
1086 } while (0) 1088 } while (0)
1087 1089
1088
1089 /* Lisp_Free is the type to represent a free list member inside a frob 1090 /* Lisp_Free is the type to represent a free list member inside a frob
1090 block of any lisp object type. */ 1091 block of any lisp object type. */
1091 typedef struct Lisp_Free 1092 typedef struct Lisp_Free
1092 { 1093 {
1093 struct lrecord_header lheader; 1094 struct lrecord_header lheader;
1170 #else 1171 #else
1171 #define FREE_FIXED_TYPE_WHEN_NOT_IN_GC(type, structtype, ptr) 1172 #define FREE_FIXED_TYPE_WHEN_NOT_IN_GC(type, structtype, ptr)
1172 #endif 1173 #endif
1173 #endif /* not MC_ALLOC */ 1174 #endif /* not MC_ALLOC */
1174 1175
1176 #ifdef MC_ALLOC
1177 #define ALLOCATE_FIXED_TYPE_AND_SET_IMPL(type, lisp_type, var, lrec_ptr) \
1178 do { \
1179 (var) = alloc_lrecord_type (lisp_type, lrec_ptr); \
1180 } while (0)
1181 #define NOSEEUM_ALLOCATE_FIXED_TYPE_AND_SET_IMPL(type, lisp_type, var, \
1182 lrec_ptr) \
1183 do { \
1184 (var) = noseeum_alloc_lrecord_type (lisp_type, lrec_ptr); \
1185 } while (0)
1186 #else /* not MC_ALLOC */
1187 #define ALLOCATE_FIXED_TYPE_AND_SET_IMPL(type, lisp_type, var, lrec_ptr) \
1188 do \
1189 { \
1190 ALLOCATE_FIXED_TYPE (type, lisp_type, var); \
1191 set_lheader_implementation (&(var)->lheader, lrec_ptr); \
1192 } while (0)
1193 #define NOSEEUM_ALLOCATE_FIXED_TYPE_AND_SET_IMPL(type, lisp_type, var, \
1194 lrec_ptr) \
1195 do \
1196 { \
1197 NOSEEUM_ALLOCATE_FIXED_TYPE (type, lisp_type, var); \
1198 set_lheader_implementation (&(var)->lheader, lrec_ptr); \
1199 } while (0)
1200 #endif /* MC_ALLOC */
1201
1175 1202
1176 1203
1177 /************************************************************************/ 1204 /************************************************************************/
1178 /* Cons allocation */ 1205 /* Cons allocation */
1179 /************************************************************************/ 1206 /************************************************************************/
1180 1207
1181 #ifndef MC_ALLOC
1182 DECLARE_FIXED_TYPE_ALLOC (cons, Lisp_Cons); 1208 DECLARE_FIXED_TYPE_ALLOC (cons, Lisp_Cons);
1183 /* conses are used and freed so often that we set this really high */ 1209 /* conses are used and freed so often that we set this really high */
1184 /* #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_cons 20000 */ 1210 /* #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_cons 20000 */
1185 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_cons 2000 1211 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_cons 2000
1186 #endif /* not MC_ALLOC */
1187 1212
1188 static Lisp_Object 1213 static Lisp_Object
1189 mark_cons (Lisp_Object obj) 1214 mark_cons (Lisp_Object obj)
1190 { 1215 {
1191 if (NILP (XCDR (obj))) 1216 if (NILP (XCDR (obj)))
1235 { 1260 {
1236 /* This cannot GC. */ 1261 /* This cannot GC. */
1237 Lisp_Object val; 1262 Lisp_Object val;
1238 Lisp_Cons *c; 1263 Lisp_Cons *c;
1239 1264
1240 #ifdef MC_ALLOC 1265 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (cons, Lisp_Cons, c, &lrecord_cons);
1241 c = alloc_lrecord_type (Lisp_Cons, &lrecord_cons);
1242 #else /* not MC_ALLOC */
1243 ALLOCATE_FIXED_TYPE (cons, Lisp_Cons, c);
1244 set_lheader_implementation (&c->lheader, &lrecord_cons);
1245 #endif /* not MC_ALLOC */
1246 val = wrap_cons (c); 1266 val = wrap_cons (c);
1247 XSETCAR (val, car); 1267 XSETCAR (val, car);
1248 XSETCDR (val, cdr); 1268 XSETCDR (val, cdr);
1249 return val; 1269 return val;
1250 } 1270 }
1256 noseeum_cons (Lisp_Object car, Lisp_Object cdr) 1276 noseeum_cons (Lisp_Object car, Lisp_Object cdr)
1257 { 1277 {
1258 Lisp_Object val; 1278 Lisp_Object val;
1259 Lisp_Cons *c; 1279 Lisp_Cons *c;
1260 1280
1261 #ifdef MC_ALLOC 1281 NOSEEUM_ALLOCATE_FIXED_TYPE_AND_SET_IMPL (cons, Lisp_Cons, c, &lrecord_cons);
1262 c = noseeum_alloc_lrecord_type (Lisp_Cons, &lrecord_cons);
1263 #else /* not MC_ALLOC */
1264 NOSEEUM_ALLOCATE_FIXED_TYPE (cons, Lisp_Cons, c);
1265 set_lheader_implementation (&c->lheader, &lrecord_cons);
1266 #endif /* not MC_ALLOC */
1267 val = wrap_cons (c); 1282 val = wrap_cons (c);
1268 XCAR (val) = car; 1283 XCAR (val) = car;
1269 XCDR (val) = cdr; 1284 XCDR (val) = cdr;
1270 return val; 1285 return val;
1271 } 1286 }
1363 /* Float allocation */ 1378 /* Float allocation */
1364 /************************************************************************/ 1379 /************************************************************************/
1365 1380
1366 /*** With enhanced number support, these are short floats */ 1381 /*** With enhanced number support, these are short floats */
1367 1382
1368 #ifndef MC_ALLOC
1369 DECLARE_FIXED_TYPE_ALLOC (float, Lisp_Float); 1383 DECLARE_FIXED_TYPE_ALLOC (float, Lisp_Float);
1370 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_float 1000 1384 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_float 1000
1371 #endif /* not MC_ALLOC */
1372 1385
1373 Lisp_Object 1386 Lisp_Object
1374 make_float (double float_value) 1387 make_float (double float_value)
1375 { 1388 {
1376 Lisp_Float *f; 1389 Lisp_Float *f;
1377 1390
1378 #ifdef MC_ALLOC 1391 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (float, Lisp_Float, f, &lrecord_float);
1379 f = alloc_lrecord_type (Lisp_Float, &lrecord_float);
1380 #else /* not MC_ALLOC */
1381 ALLOCATE_FIXED_TYPE (float, Lisp_Float, f);
1382 1392
1383 /* Avoid dump-time `uninitialized memory read' purify warnings. */ 1393 /* Avoid dump-time `uninitialized memory read' purify warnings. */
1384 if (sizeof (struct lrecord_header) + sizeof (double) != sizeof (*f)) 1394 if (sizeof (struct lrecord_header) + sizeof (double) != sizeof (*f))
1385 xzero (*f); 1395 zero_lrecord (f);
1386 #endif /* not MC_ALLOC */ 1396
1387
1388 set_lheader_implementation (&f->lheader, &lrecord_float);
1389 float_data (f) = float_value; 1397 float_data (f) = float_value;
1390 return wrap_float (f); 1398 return wrap_float (f);
1391 } 1399 }
1392 1400
1393 1401
1395 /* Enhanced number allocation */ 1403 /* Enhanced number allocation */
1396 /************************************************************************/ 1404 /************************************************************************/
1397 1405
1398 /*** Bignum ***/ 1406 /*** Bignum ***/
1399 #ifdef HAVE_BIGNUM 1407 #ifdef HAVE_BIGNUM
1400 #ifndef MC_ALLOC
1401 DECLARE_FIXED_TYPE_ALLOC (bignum, Lisp_Bignum); 1408 DECLARE_FIXED_TYPE_ALLOC (bignum, Lisp_Bignum);
1402 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_bignum 250 1409 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_bignum 250
1403 #endif /* not MC_ALLOC */
1404 1410
1405 /* WARNING: This function returns a bignum even if its argument fits into a 1411 /* WARNING: This function returns a bignum even if its argument fits into a
1406 fixnum. See Fcanonicalize_number(). */ 1412 fixnum. See Fcanonicalize_number(). */
1407 Lisp_Object 1413 Lisp_Object
1408 make_bignum (long bignum_value) 1414 make_bignum (long bignum_value)
1409 { 1415 {
1410 Lisp_Bignum *b; 1416 Lisp_Bignum *b;
1411 1417
1412 #ifdef MC_ALLOC 1418 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (bignum, Lisp_Bignum, b, &lrecord_bignum);
1413 b = alloc_lrecord_type (Lisp_Bignum, &lrecord_bignum);
1414 #else /* not MC_ALLOC */
1415 ALLOCATE_FIXED_TYPE (bignum, Lisp_Bignum, b);
1416 set_lheader_implementation (&b->lheader, &lrecord_bignum);
1417 #endif /* not MC_ALLOC */
1418 bignum_init (bignum_data (b)); 1419 bignum_init (bignum_data (b));
1419 bignum_set_long (bignum_data (b), bignum_value); 1420 bignum_set_long (bignum_data (b), bignum_value);
1420 return wrap_bignum (b); 1421 return wrap_bignum (b);
1421 } 1422 }
1422 1423
1425 Lisp_Object 1426 Lisp_Object
1426 make_bignum_bg (bignum bg) 1427 make_bignum_bg (bignum bg)
1427 { 1428 {
1428 Lisp_Bignum *b; 1429 Lisp_Bignum *b;
1429 1430
1430 #ifdef MC_ALLOC 1431 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (bignum, Lisp_Bignum, b, &lrecord_bignum);
1431 b = alloc_lrecord_type (Lisp_Bignum, &lrecord_bignum);
1432 #else /* not MC_ALLOC */
1433 ALLOCATE_FIXED_TYPE (bignum, Lisp_Bignum, b);
1434 set_lheader_implementation (&b->lheader, &lrecord_bignum);
1435 #endif /* not MC_ALLOC */
1436 bignum_init (bignum_data (b)); 1432 bignum_init (bignum_data (b));
1437 bignum_set (bignum_data (b), bg); 1433 bignum_set (bignum_data (b), bg);
1438 return wrap_bignum (b); 1434 return wrap_bignum (b);
1439 } 1435 }
1440 #endif /* HAVE_BIGNUM */ 1436 #endif /* HAVE_BIGNUM */
1441 1437
1442 /*** Ratio ***/ 1438 /*** Ratio ***/
1443 #ifdef HAVE_RATIO 1439 #ifdef HAVE_RATIO
1444 #ifndef MC_ALLOC
1445 DECLARE_FIXED_TYPE_ALLOC (ratio, Lisp_Ratio); 1440 DECLARE_FIXED_TYPE_ALLOC (ratio, Lisp_Ratio);
1446 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_ratio 250 1441 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_ratio 250
1447 #endif /* not MC_ALLOC */
1448 1442
1449 Lisp_Object 1443 Lisp_Object
1450 make_ratio (long numerator, unsigned long denominator) 1444 make_ratio (long numerator, unsigned long denominator)
1451 { 1445 {
1452 Lisp_Ratio *r; 1446 Lisp_Ratio *r;
1453 1447
1454 #ifdef MC_ALLOC 1448 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (ratio, Lisp_Ratio, r, &lrecord_ratio);
1455 r = alloc_lrecord_type (Lisp_Ratio, &lrecord_ratio);
1456 #else /* not MC_ALLOC */
1457 ALLOCATE_FIXED_TYPE (ratio, Lisp_Ratio, r);
1458 set_lheader_implementation (&r->lheader, &lrecord_ratio);
1459 #endif /* not MC_ALLOC */
1460 ratio_init (ratio_data (r)); 1449 ratio_init (ratio_data (r));
1461 ratio_set_long_ulong (ratio_data (r), numerator, denominator); 1450 ratio_set_long_ulong (ratio_data (r), numerator, denominator);
1462 ratio_canonicalize (ratio_data (r)); 1451 ratio_canonicalize (ratio_data (r));
1463 return wrap_ratio (r); 1452 return wrap_ratio (r);
1464 } 1453 }
1466 Lisp_Object 1455 Lisp_Object
1467 make_ratio_bg (bignum numerator, bignum denominator) 1456 make_ratio_bg (bignum numerator, bignum denominator)
1468 { 1457 {
1469 Lisp_Ratio *r; 1458 Lisp_Ratio *r;
1470 1459
1471 #ifdef MC_ALLOC 1460 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (ratio, Lisp_Ratio, r, &lrecord_ratio);
1472 r = alloc_lrecord_type (Lisp_Ratio, &lrecord_ratio);
1473 #else /* not MC_ALLOC */
1474 ALLOCATE_FIXED_TYPE (ratio, Lisp_Ratio, r);
1475 set_lheader_implementation (&r->lheader, &lrecord_ratio);
1476 #endif /* not MC_ALLOC */
1477 ratio_init (ratio_data (r)); 1461 ratio_init (ratio_data (r));
1478 ratio_set_bignum_bignum (ratio_data (r), numerator, denominator); 1462 ratio_set_bignum_bignum (ratio_data (r), numerator, denominator);
1479 ratio_canonicalize (ratio_data (r)); 1463 ratio_canonicalize (ratio_data (r));
1480 return wrap_ratio (r); 1464 return wrap_ratio (r);
1481 } 1465 }
1483 Lisp_Object 1467 Lisp_Object
1484 make_ratio_rt (ratio rat) 1468 make_ratio_rt (ratio rat)
1485 { 1469 {
1486 Lisp_Ratio *r; 1470 Lisp_Ratio *r;
1487 1471
1488 #ifdef MC_ALLOC 1472 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (ratio, Lisp_Ratio, r, &lrecord_ratio);
1489 r = alloc_lrecord_type (Lisp_Ratio, &lrecord_ratio);
1490 #else /* not MC_ALLOC */
1491 ALLOCATE_FIXED_TYPE (ratio, Lisp_Ratio, r);
1492 set_lheader_implementation (&r->lheader, &lrecord_ratio);
1493 #endif /* not MC_ALLOC */
1494 ratio_init (ratio_data (r)); 1473 ratio_init (ratio_data (r));
1495 ratio_set (ratio_data (r), rat); 1474 ratio_set (ratio_data (r), rat);
1496 return wrap_ratio (r); 1475 return wrap_ratio (r);
1497 } 1476 }
1498 #endif /* HAVE_RATIO */ 1477 #endif /* HAVE_RATIO */
1499 1478
1500 /*** Bigfloat ***/ 1479 /*** Bigfloat ***/
1501 #ifdef HAVE_BIGFLOAT 1480 #ifdef HAVE_BIGFLOAT
1502 #ifndef MC_ALLOC
1503 DECLARE_FIXED_TYPE_ALLOC (bigfloat, Lisp_Bigfloat); 1481 DECLARE_FIXED_TYPE_ALLOC (bigfloat, Lisp_Bigfloat);
1504 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_bigfloat 250 1482 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_bigfloat 250
1505 #endif /* not MC_ALLOC */
1506 1483
1507 /* This function creates a bigfloat with the default precision if the 1484 /* This function creates a bigfloat with the default precision if the
1508 PRECISION argument is zero. */ 1485 PRECISION argument is zero. */
1509 Lisp_Object 1486 Lisp_Object
1510 make_bigfloat (double float_value, unsigned long precision) 1487 make_bigfloat (double float_value, unsigned long precision)
1511 { 1488 {
1512 Lisp_Bigfloat *f; 1489 Lisp_Bigfloat *f;
1513 1490
1514 #ifdef MC_ALLOC 1491 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (bigfloat, Lisp_Bigfloat, f, &lrecord_bigfloat);
1515 f = alloc_lrecord_type (Lisp_Bigfloat, &lrecord_bigfloat);
1516 #else /* not MC_ALLOC */
1517 ALLOCATE_FIXED_TYPE (bigfloat, Lisp_Bigfloat, f);
1518 set_lheader_implementation (&f->lheader, &lrecord_bigfloat);
1519 #endif /* not MC_ALLOC */
1520 if (precision == 0UL) 1492 if (precision == 0UL)
1521 bigfloat_init (bigfloat_data (f)); 1493 bigfloat_init (bigfloat_data (f));
1522 else 1494 else
1523 bigfloat_init_prec (bigfloat_data (f), precision); 1495 bigfloat_init_prec (bigfloat_data (f), precision);
1524 bigfloat_set_double (bigfloat_data (f), float_value); 1496 bigfloat_set_double (bigfloat_data (f), float_value);
1529 Lisp_Object 1501 Lisp_Object
1530 make_bigfloat_bf (bigfloat float_value) 1502 make_bigfloat_bf (bigfloat float_value)
1531 { 1503 {
1532 Lisp_Bigfloat *f; 1504 Lisp_Bigfloat *f;
1533 1505
1534 #ifdef MC_ALLOC 1506 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (bigfloat, Lisp_Bigfloat, f, &lrecord_bigfloat);
1535 f = alloc_lrecord_type (Lisp_Bigfloat, &lrecord_bigfloat);
1536 #else /* not MC_ALLOC */
1537 ALLOCATE_FIXED_TYPE (bigfloat, Lisp_Bigfloat, f);
1538 set_lheader_implementation (&f->lheader, &lrecord_bigfloat);
1539 #endif /* not MC_ALLOC */
1540 bigfloat_init_prec (bigfloat_data (f), bigfloat_get_prec (float_value)); 1507 bigfloat_init_prec (bigfloat_data (f), bigfloat_get_prec (float_value));
1541 bigfloat_set (bigfloat_data (f), float_value); 1508 bigfloat_set (bigfloat_data (f), float_value);
1542 return wrap_bigfloat (f); 1509 return wrap_bigfloat (f);
1543 } 1510 }
1544 #endif /* HAVE_BIGFLOAT */ 1511 #endif /* HAVE_BIGFLOAT */
1611 { 1578 {
1612 /* no `next' field; we use lcrecords */ 1579 /* no `next' field; we use lcrecords */
1613 Bytecount sizem = FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Vector, Lisp_Object, 1580 Bytecount sizem = FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Vector, Lisp_Object,
1614 contents, sizei); 1581 contents, sizei);
1615 Lisp_Vector *p = 1582 Lisp_Vector *p =
1616 #ifdef MC_ALLOC 1583 (Lisp_Vector *) BASIC_ALLOC_LCRECORD (sizem, &lrecord_vector);
1617 (Lisp_Vector *) alloc_lrecord (sizem, &lrecord_vector);
1618 #else /* not MC_ALLOC */
1619 (Lisp_Vector *) basic_alloc_lcrecord (sizem, &lrecord_vector);
1620 #endif /* not MC_ALLOC */
1621 1584
1622 p->size = sizei; 1585 p->size = sizei;
1623 return p; 1586 return p;
1624 } 1587 }
1625 1588
1772 Elemcount num_longs = BIT_VECTOR_LONG_STORAGE (sizei); 1735 Elemcount num_longs = BIT_VECTOR_LONG_STORAGE (sizei);
1773 Bytecount sizem = FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Bit_Vector, 1736 Bytecount sizem = FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Bit_Vector,
1774 unsigned long, 1737 unsigned long,
1775 bits, num_longs); 1738 bits, num_longs);
1776 Lisp_Bit_Vector *p = (Lisp_Bit_Vector *) 1739 Lisp_Bit_Vector *p = (Lisp_Bit_Vector *)
1777 #ifdef MC_ALLOC 1740 BASIC_ALLOC_LCRECORD (sizem, &lrecord_bit_vector);
1778 alloc_lrecord (sizem, &lrecord_bit_vector);
1779 #else /* not MC_ALLOC */
1780 basic_alloc_lcrecord (sizem, &lrecord_bit_vector);
1781 #endif /* not MC_ALLOC */
1782 1741
1783 bit_vector_length (p) = sizei; 1742 bit_vector_length (p) = sizei;
1784 return p; 1743 return p;
1785 } 1744 }
1786 1745
1852 1811
1853 /************************************************************************/ 1812 /************************************************************************/
1854 /* Compiled-function allocation */ 1813 /* Compiled-function allocation */
1855 /************************************************************************/ 1814 /************************************************************************/
1856 1815
1857 #ifndef MC_ALLOC
1858 DECLARE_FIXED_TYPE_ALLOC (compiled_function, Lisp_Compiled_Function); 1816 DECLARE_FIXED_TYPE_ALLOC (compiled_function, Lisp_Compiled_Function);
1859 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_compiled_function 1000 1817 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_compiled_function 1000
1860 #endif /* not MC_ALLOC */
1861 1818
1862 static Lisp_Object 1819 static Lisp_Object
1863 make_compiled_function (void) 1820 make_compiled_function (void)
1864 { 1821 {
1865 Lisp_Compiled_Function *f; 1822 Lisp_Compiled_Function *f;
1866 1823
1867 #ifdef MC_ALLOC 1824 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (compiled_function, Lisp_Compiled_Function,
1868 f = alloc_lrecord_type (Lisp_Compiled_Function, &lrecord_compiled_function); 1825 f, &lrecord_compiled_function);
1869 #else /* not MC_ALLOC */
1870 ALLOCATE_FIXED_TYPE (compiled_function, Lisp_Compiled_Function, f);
1871 set_lheader_implementation (&f->lheader, &lrecord_compiled_function);
1872 #endif /* not MC_ALLOC */
1873 1826
1874 f->stack_depth = 0; 1827 f->stack_depth = 0;
1875 f->specpdl_depth = 0; 1828 f->specpdl_depth = 0;
1876 f->flags.documentationp = 0; 1829 f->flags.documentationp = 0;
1877 f->flags.interactivep = 0; 1830 f->flags.interactivep = 0;
1999 1952
2000 /************************************************************************/ 1953 /************************************************************************/
2001 /* Symbol allocation */ 1954 /* Symbol allocation */
2002 /************************************************************************/ 1955 /************************************************************************/
2003 1956
2004 #ifndef MC_ALLOC
2005 DECLARE_FIXED_TYPE_ALLOC (symbol, Lisp_Symbol); 1957 DECLARE_FIXED_TYPE_ALLOC (symbol, Lisp_Symbol);
2006 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_symbol 1000 1958 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_symbol 1000
2007 #endif /* not MC_ALLOC */
2008 1959
2009 DEFUN ("make-symbol", Fmake_symbol, 1, 1, 0, /* 1960 DEFUN ("make-symbol", Fmake_symbol, 1, 1, 0, /*
2010 Return a newly allocated uninterned symbol whose name is NAME. 1961 Return a newly allocated uninterned symbol whose name is NAME.
2011 Its value and function definition are void, and its property list is nil. 1962 Its value and function definition are void, and its property list is nil.
2012 */ 1963 */
2014 { 1965 {
2015 Lisp_Symbol *p; 1966 Lisp_Symbol *p;
2016 1967
2017 CHECK_STRING (name); 1968 CHECK_STRING (name);
2018 1969
2019 #ifdef MC_ALLOC 1970 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (symbol, Lisp_Symbol, p, &lrecord_symbol);
2020 p = alloc_lrecord_type (Lisp_Symbol, &lrecord_symbol);
2021 #else /* not MC_ALLOC */
2022 ALLOCATE_FIXED_TYPE (symbol, Lisp_Symbol, p);
2023 set_lheader_implementation (&p->lheader, &lrecord_symbol);
2024 #endif /* not MC_ALLOC */
2025 p->name = name; 1971 p->name = name;
2026 p->plist = Qnil; 1972 p->plist = Qnil;
2027 p->value = Qunbound; 1973 p->value = Qunbound;
2028 p->function = Qunbound; 1974 p->function = Qunbound;
2029 symbol_next (p) = 0; 1975 symbol_next (p) = 0;
2033 1979
2034 /************************************************************************/ 1980 /************************************************************************/
2035 /* Extent allocation */ 1981 /* Extent allocation */
2036 /************************************************************************/ 1982 /************************************************************************/
2037 1983
2038 #ifndef MC_ALLOC
2039 DECLARE_FIXED_TYPE_ALLOC (extent, struct extent); 1984 DECLARE_FIXED_TYPE_ALLOC (extent, struct extent);
2040 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_extent 1000 1985 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_extent 1000
2041 #endif /* not MC_ALLOC */
2042 1986
2043 struct extent * 1987 struct extent *
2044 allocate_extent (void) 1988 allocate_extent (void)
2045 { 1989 {
2046 struct extent *e; 1990 struct extent *e;
2047 1991
2048 #ifdef MC_ALLOC 1992 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (extent, struct extent, e, &lrecord_extent);
2049 e = alloc_lrecord_type (struct extent, &lrecord_extent);
2050 #else /* not MC_ALLOC */
2051 ALLOCATE_FIXED_TYPE (extent, struct extent, e);
2052 set_lheader_implementation (&e->lheader, &lrecord_extent);
2053 #endif /* not MC_ALLOC */
2054 extent_object (e) = Qnil; 1993 extent_object (e) = Qnil;
2055 set_extent_start (e, -1); 1994 set_extent_start (e, -1);
2056 set_extent_end (e, -1); 1995 set_extent_end (e, -1);
2057 e->plist = Qnil; 1996 e->plist = Qnil;
2058 1997
2068 2007
2069 /************************************************************************/ 2008 /************************************************************************/
2070 /* Event allocation */ 2009 /* Event allocation */
2071 /************************************************************************/ 2010 /************************************************************************/
2072 2011
2073 #ifndef MC_ALLOC
2074 DECLARE_FIXED_TYPE_ALLOC (event, Lisp_Event); 2012 DECLARE_FIXED_TYPE_ALLOC (event, Lisp_Event);
2075 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_event 1000 2013 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_event 1000
2076 #endif /* not MC_ALLOC */
2077 2014
2078 Lisp_Object 2015 Lisp_Object
2079 allocate_event (void) 2016 allocate_event (void)
2080 { 2017 {
2081 Lisp_Event *e; 2018 Lisp_Event *e;
2082 2019
2083 #ifdef MC_ALLOC 2020 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (event, Lisp_Event, e, &lrecord_event);
2084 e = alloc_lrecord_type (Lisp_Event, &lrecord_event);
2085 #else /* not MC_ALLOC */
2086 ALLOCATE_FIXED_TYPE (event, Lisp_Event, e);
2087 set_lheader_implementation (&e->lheader, &lrecord_event);
2088 #endif /* not MC_ALLOC */
2089 2021
2090 return wrap_event (e); 2022 return wrap_event (e);
2091 } 2023 }
2092 2024
2093 #ifdef EVENT_DATA_AS_OBJECTS 2025 #ifdef EVENT_DATA_AS_OBJECTS
2094 #ifndef MC_ALLOC
2095 DECLARE_FIXED_TYPE_ALLOC (key_data, Lisp_Key_Data); 2026 DECLARE_FIXED_TYPE_ALLOC (key_data, Lisp_Key_Data);
2096 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_key_data 1000 2027 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_key_data 1000
2097 #endif /* not MC_ALLOC */
2098 2028
2099 Lisp_Object 2029 Lisp_Object
2100 make_key_data (void) 2030 make_key_data (void)
2101 { 2031 {
2102 Lisp_Key_Data *d; 2032 Lisp_Key_Data *d;
2103 2033
2104 #ifdef MC_ALLOC 2034 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (key_data, Lisp_Key_Data, d,
2105 d = alloc_lrecord_type (Lisp_Key_Data, &lrecord_key_data); 2035 &lrecord_key_data);
2106 #else /* not MC_ALLOC */ 2036 zero_lrecord (d);
2107 ALLOCATE_FIXED_TYPE (key_data, Lisp_Key_Data, d);
2108 xzero (*d);
2109 set_lheader_implementation (&d->lheader, &lrecord_key_data);
2110 #endif /* not MC_ALLOC */
2111 d->keysym = Qnil; 2037 d->keysym = Qnil;
2112 2038
2113 return wrap_key_data (d); 2039 return wrap_key_data (d);
2114 } 2040 }
2115 2041
2116 #ifndef MC_ALLOC
2117 DECLARE_FIXED_TYPE_ALLOC (button_data, Lisp_Button_Data); 2042 DECLARE_FIXED_TYPE_ALLOC (button_data, Lisp_Button_Data);
2118 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_button_data 1000 2043 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_button_data 1000
2119 #endif /* not MC_ALLOC */
2120 2044
2121 Lisp_Object 2045 Lisp_Object
2122 make_button_data (void) 2046 make_button_data (void)
2123 { 2047 {
2124 Lisp_Button_Data *d; 2048 Lisp_Button_Data *d;
2125 2049
2126 #ifdef MC_ALLOC 2050 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (button_data, Lisp_Button_Data, d, &lrecord_button_data);
2127 d = alloc_lrecord_type (Lisp_Button_Data, &lrecord_button_data); 2051 zero_lrecord (d);
2128 #else /* not MC_ALLOC */
2129 ALLOCATE_FIXED_TYPE (button_data, Lisp_Button_Data, d);
2130 xzero (*d);
2131 set_lheader_implementation (&d->lheader, &lrecord_button_data);
2132
2133 #endif /* not MC_ALLOC */
2134 return wrap_button_data (d); 2052 return wrap_button_data (d);
2135 } 2053 }
2136 2054
2137 #ifndef MC_ALLOC
2138 DECLARE_FIXED_TYPE_ALLOC (motion_data, Lisp_Motion_Data); 2055 DECLARE_FIXED_TYPE_ALLOC (motion_data, Lisp_Motion_Data);
2139 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_motion_data 1000 2056 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_motion_data 1000
2140 #endif /* not MC_ALLOC */
2141 2057
2142 Lisp_Object 2058 Lisp_Object
2143 make_motion_data (void) 2059 make_motion_data (void)
2144 { 2060 {
2145 Lisp_Motion_Data *d; 2061 Lisp_Motion_Data *d;
2146 2062
2147 #ifdef MC_ALLOC 2063 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (motion_data, Lisp_Motion_Data, d, &lrecord_motion_data);
2148 d = alloc_lrecord_type (Lisp_Motion_Data, &lrecord_motion_data); 2064 zero_lrecord (d);
2149 #else /* not MC_ALLOC */
2150 ALLOCATE_FIXED_TYPE (motion_data, Lisp_Motion_Data, d);
2151 xzero (*d);
2152 set_lheader_implementation (&d->lheader, &lrecord_motion_data);
2153 #endif /* not MC_ALLOC */
2154 2065
2155 return wrap_motion_data (d); 2066 return wrap_motion_data (d);
2156 } 2067 }
2157 2068
2158 #ifndef MC_ALLOC
2159 DECLARE_FIXED_TYPE_ALLOC (process_data, Lisp_Process_Data); 2069 DECLARE_FIXED_TYPE_ALLOC (process_data, Lisp_Process_Data);
2160 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_process_data 1000 2070 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_process_data 1000
2161 #endif /* not MC_ALLOC */
2162 2071
2163 Lisp_Object 2072 Lisp_Object
2164 make_process_data (void) 2073 make_process_data (void)
2165 { 2074 {
2166 Lisp_Process_Data *d; 2075 Lisp_Process_Data *d;
2167 2076
2168 #ifdef MC_ALLOC 2077 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (process_data, Lisp_Process_Data, d, &lrecord_process_data);
2169 d = alloc_lrecord_type (Lisp_Process_Data, &lrecord_process_data); 2078 zero_lrecord (d);
2170 #else /* not MC_ALLOC */
2171 ALLOCATE_FIXED_TYPE (process_data, Lisp_Process_Data, d);
2172 xzero (*d);
2173 set_lheader_implementation (&d->lheader, &lrecord_process_data);
2174 d->process = Qnil; 2079 d->process = Qnil;
2175 #endif /* not MC_ALLOC */
2176 2080
2177 return wrap_process_data (d); 2081 return wrap_process_data (d);
2178 } 2082 }
2179 2083
2180 #ifndef MC_ALLOC
2181 DECLARE_FIXED_TYPE_ALLOC (timeout_data, Lisp_Timeout_Data); 2084 DECLARE_FIXED_TYPE_ALLOC (timeout_data, Lisp_Timeout_Data);
2182 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_timeout_data 1000 2085 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_timeout_data 1000
2183 #endif /* not MC_ALLOC */
2184 2086
2185 Lisp_Object 2087 Lisp_Object
2186 make_timeout_data (void) 2088 make_timeout_data (void)
2187 { 2089 {
2188 Lisp_Timeout_Data *d; 2090 Lisp_Timeout_Data *d;
2189 2091
2190 #ifdef MC_ALLOC 2092 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (timeout_data, Lisp_Timeout_Data, d, &lrecord_timeout_data);
2191 d = alloc_lrecord_type (Lisp_Timeout_Data, &lrecord_timeout_data); 2093 zero_lrecord (d);
2192 #else /* not MC_ALLOC */
2193 ALLOCATE_FIXED_TYPE (timeout_data, Lisp_Timeout_Data, d);
2194 xzero (*d);
2195 set_lheader_implementation (&d->lheader, &lrecord_timeout_data);
2196 d->function = Qnil; 2094 d->function = Qnil;
2197 d->object = Qnil; 2095 d->object = Qnil;
2198 #endif /* not MC_ALLOC */
2199 2096
2200 return wrap_timeout_data (d); 2097 return wrap_timeout_data (d);
2201 } 2098 }
2202 2099
2203 #ifndef MC_ALLOC
2204 DECLARE_FIXED_TYPE_ALLOC (magic_data, Lisp_Magic_Data); 2100 DECLARE_FIXED_TYPE_ALLOC (magic_data, Lisp_Magic_Data);
2205 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_magic_data 1000 2101 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_magic_data 1000
2206 #endif /* not MC_ALLOC */
2207 2102
2208 Lisp_Object 2103 Lisp_Object
2209 make_magic_data (void) 2104 make_magic_data (void)
2210 { 2105 {
2211 Lisp_Magic_Data *d; 2106 Lisp_Magic_Data *d;
2212 2107
2213 #ifdef MC_ALLOC 2108 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (magic_data, Lisp_Magic_Data, d, &lrecord_magic_data);
2214 d = alloc_lrecord_type (Lisp_Magic_Data, &lrecord_magic_data); 2109 zero_lrecord (d);
2215 #else /* not MC_ALLOC */
2216 ALLOCATE_FIXED_TYPE (magic_data, Lisp_Magic_Data, d);
2217 xzero (*d);
2218 set_lheader_implementation (&d->lheader, &lrecord_magic_data);
2219 #endif /* not MC_ALLOC */
2220 2110
2221 return wrap_magic_data (d); 2111 return wrap_magic_data (d);
2222 } 2112 }
2223 2113
2224 #ifndef MC_ALLOC
2225 DECLARE_FIXED_TYPE_ALLOC (magic_eval_data, Lisp_Magic_Eval_Data); 2114 DECLARE_FIXED_TYPE_ALLOC (magic_eval_data, Lisp_Magic_Eval_Data);
2226 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_magic_eval_data 1000 2115 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_magic_eval_data 1000
2227 #endif /* not MC_ALLOC */
2228 2116
2229 Lisp_Object 2117 Lisp_Object
2230 make_magic_eval_data (void) 2118 make_magic_eval_data (void)
2231 { 2119 {
2232 Lisp_Magic_Eval_Data *d; 2120 Lisp_Magic_Eval_Data *d;
2233 2121
2234 #ifdef MC_ALLOC 2122 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (magic_eval_data, Lisp_Magic_Eval_Data, d, &lrecord_magic_eval_data);
2235 d = alloc_lrecord_type (Lisp_Magic_Eval_Data, &lrecord_magic_eval_data); 2123 zero_lrecord (d);
2236 #else /* not MC_ALLOC */
2237 ALLOCATE_FIXED_TYPE (magic_eval_data, Lisp_Magic_Eval_Data, d);
2238 xzero (*d);
2239 set_lheader_implementation (&d->lheader, &lrecord_magic_eval_data);
2240 d->object = Qnil; 2124 d->object = Qnil;
2241 #endif /* not MC_ALLOC */
2242 2125
2243 return wrap_magic_eval_data (d); 2126 return wrap_magic_eval_data (d);
2244 } 2127 }
2245 2128
2246 #ifndef MC_ALLOC
2247 DECLARE_FIXED_TYPE_ALLOC (eval_data, Lisp_Eval_Data); 2129 DECLARE_FIXED_TYPE_ALLOC (eval_data, Lisp_Eval_Data);
2248 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_eval_data 1000 2130 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_eval_data 1000
2249 #endif /* not MC_ALLOC */
2250 2131
2251 Lisp_Object 2132 Lisp_Object
2252 make_eval_data (void) 2133 make_eval_data (void)
2253 { 2134 {
2254 Lisp_Eval_Data *d; 2135 Lisp_Eval_Data *d;
2255 2136
2256 #ifdef MC_ALLOC 2137 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (eval_data, Lisp_Eval_Data, d, &lrecord_eval_data);
2257 d = alloc_lrecord_type (Lisp_Eval_Data, &lrecord_eval_data); 2138 zero_lrecord (d);
2258 #else /* not MC_ALLOC */
2259 ALLOCATE_FIXED_TYPE (eval_data, Lisp_Eval_Data, d);
2260 xzero (*d);
2261 set_lheader_implementation (&d->lheader, &lrecord_eval_data);
2262 d->function = Qnil; 2139 d->function = Qnil;
2263 d->object = Qnil; 2140 d->object = Qnil;
2264 #endif /* not MC_ALLOC */
2265 2141
2266 return wrap_eval_data (d); 2142 return wrap_eval_data (d);
2267 } 2143 }
2268 2144
2269 #ifndef MC_ALLOC
2270 DECLARE_FIXED_TYPE_ALLOC (misc_user_data, Lisp_Misc_User_Data); 2145 DECLARE_FIXED_TYPE_ALLOC (misc_user_data, Lisp_Misc_User_Data);
2271 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_misc_user_data 1000 2146 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_misc_user_data 1000
2272 #endif /* not MC_ALLOC */
2273 2147
2274 Lisp_Object 2148 Lisp_Object
2275 make_misc_user_data (void) 2149 make_misc_user_data (void)
2276 { 2150 {
2277 Lisp_Misc_User_Data *d; 2151 Lisp_Misc_User_Data *d;
2278 2152
2279 #ifdef MC_ALLOC 2153 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (misc_user_data, Lisp_Misc_User_Data, d, &lrecord_misc_user_data);
2280 d = alloc_lrecord_type (Lisp_Misc_User_Data, &lrecord_misc_user_data); 2154 zero_lrecord (d);
2281 #else /* not MC_ALLOC */
2282 ALLOCATE_FIXED_TYPE (misc_user_data, Lisp_Misc_User_Data, d);
2283 xzero (*d);
2284 set_lheader_implementation (&d->lheader, &lrecord_misc_user_data);
2285 d->function = Qnil; 2155 d->function = Qnil;
2286 d->object = Qnil; 2156 d->object = Qnil;
2287 #endif /* not MC_ALLOC */
2288 2157
2289 return wrap_misc_user_data (d); 2158 return wrap_misc_user_data (d);
2290 } 2159 }
2291 2160
2292 #endif /* EVENT_DATA_AS_OBJECTS */ 2161 #endif /* EVENT_DATA_AS_OBJECTS */
2293 2162
2294 /************************************************************************/ 2163 /************************************************************************/
2295 /* Marker allocation */ 2164 /* Marker allocation */
2296 /************************************************************************/ 2165 /************************************************************************/
2297 2166
2298 #ifndef MC_ALLOC
2299 DECLARE_FIXED_TYPE_ALLOC (marker, Lisp_Marker); 2167 DECLARE_FIXED_TYPE_ALLOC (marker, Lisp_Marker);
2300 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_marker 1000 2168 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_marker 1000
2301 #endif /* not MC_ALLOC */
2302 2169
2303 DEFUN ("make-marker", Fmake_marker, 0, 0, 0, /* 2170 DEFUN ("make-marker", Fmake_marker, 0, 0, 0, /*
2304 Return a new marker which does not point at any place. 2171 Return a new marker which does not point at any place.
2305 */ 2172 */
2306 ()) 2173 ())
2307 { 2174 {
2308 Lisp_Marker *p; 2175 Lisp_Marker *p;
2309 2176
2310 #ifdef MC_ALLOC 2177 ALLOCATE_FIXED_TYPE_AND_SET_IMPL (marker, Lisp_Marker, p, &lrecord_marker);
2311 p = alloc_lrecord_type (Lisp_Marker, &lrecord_marker);
2312 #else /* not MC_ALLOC */
2313 ALLOCATE_FIXED_TYPE (marker, Lisp_Marker, p);
2314 set_lheader_implementation (&p->lheader, &lrecord_marker);
2315 #endif /* not MC_ALLOC */
2316 p->buffer = 0; 2178 p->buffer = 0;
2317 p->membpos = 0; 2179 p->membpos = 0;
2318 marker_next (p) = 0; 2180 marker_next (p) = 0;
2319 marker_prev (p) = 0; 2181 marker_prev (p) = 0;
2320 p->insertion_type = 0; 2182 p->insertion_type = 0;
2324 Lisp_Object 2186 Lisp_Object
2325 noseeum_make_marker (void) 2187 noseeum_make_marker (void)
2326 { 2188 {
2327 Lisp_Marker *p; 2189 Lisp_Marker *p;
2328 2190
2329 #ifdef MC_ALLOC 2191 NOSEEUM_ALLOCATE_FIXED_TYPE_AND_SET_IMPL (marker, Lisp_Marker, p,
2330 p = noseeum_alloc_lrecord_type (Lisp_Marker, &lrecord_marker); 2192 &lrecord_marker);
2331 #else /* not MC_ALLOC */
2332 NOSEEUM_ALLOCATE_FIXED_TYPE (marker, Lisp_Marker, p);
2333 set_lheader_implementation (&p->lheader, &lrecord_marker);
2334 #endif /* not MC_ALLOC */
2335 p->buffer = 0; 2193 p->buffer = 0;
2336 p->membpos = 0; 2194 p->membpos = 0;
2337 marker_next (p) = 0; 2195 marker_next (p) = 0;
2338 marker_prev (p) = 0; 2196 marker_prev (p) = 0;
2339 p->insertion_type = 0; 2197 p->insertion_type = 0;
2356 strings (since EVERY REFERENCE to a short string needed to be GCPRO'd so 2214 strings (since EVERY REFERENCE to a short string needed to be GCPRO'd so
2357 that the reference would get relocated). 2215 that the reference would get relocated).
2358 2216
2359 This new method makes things somewhat bigger, but it is MUCH safer. */ 2217 This new method makes things somewhat bigger, but it is MUCH safer. */
2360 2218
2361 #ifndef MC_ALLOC
2362 DECLARE_FIXED_TYPE_ALLOC (string, Lisp_String); 2219 DECLARE_FIXED_TYPE_ALLOC (string, Lisp_String);
2363 /* strings are used and freed quite often */ 2220 /* strings are used and freed quite often */
2364 /* #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_string 10000 */ 2221 /* #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_string 10000 */
2365 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_string 1000 2222 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_string 1000
2366 #endif /* not MC_ALLOC */
2367 2223
2368 static Lisp_Object 2224 static Lisp_Object
2369 mark_string (Lisp_Object obj) 2225 mark_string (Lisp_Object obj)
2370 { 2226 {
2371 if (CONSP (XSTRING_PLIST (obj)) && EXTENT_INFOP (XCAR (XSTRING_PLIST (obj)))) 2227 if (CONSP (XSTRING_PLIST (obj)) && EXTENT_INFOP (XCAR (XSTRING_PLIST (obj))))