comparison src/lrecord.h @ 2994:ec5f23ea6d2e

[xemacs-hg @ 2005-10-14 01:21:57 by ben] add gc percentage threshold to mc-alloc config.h.in, alloc.c, dumper.c, emacs.c, lrecord.h, mc-alloc.c, mc-alloc.h, symbols.c: Rename MC_ALLOC_TYPE_STATS to ALLOC_TYPE_STATS, since (with refactoring) this is not really specific to mc-alloc. Generalize code to implement the GC % threshold for garbage collecting. Rename `lrecord-stats' to `object-memory-usage-stats' (defined when not mc-alloc, too). Rename `memory-usage' to `total-memory-usage' and add `object-memory-usage'. Bump gc_cons_threshold to 2,000,000 (suggestion by Stephen Turnbull). Avoid use of C++ reserved word `catch'. Change address for crash reporting to xemacs-beta@xemacs.org from crashes@xemacs.org. new -> new_ in emacs.c. Turn on _CRT_SECURE_NO_DEPRECATE under Visual C++ to avoid tons of warnings in VC8.
author ben
date Fri, 14 Oct 2005 01:22:01 +0000
parents 05d62157e048
children 1e7cc382eb16
comparison
equal deleted inserted replaced
2993:49316578f12d 2994:ec5f23ea6d2e
374 374
375 extern int gc_in_progress; 375 extern int gc_in_progress;
376 376
377 #ifdef MC_ALLOC 377 #ifdef MC_ALLOC
378 #include "mc-alloc.h" 378 #include "mc-alloc.h"
379 #endif /* MC_ALLOC */ 379
380 380 #ifdef ALLOC_TYPE_STATS
381 #ifdef MC_ALLOC_TYPE_STATS
382 void init_lrecord_stats (void); 381 void init_lrecord_stats (void);
383 void inc_lrecord_string_data_stats (Bytecount size); 382 void inc_lrecord_string_data_stats (Bytecount size);
384 void dec_lrecord_string_data_stats (Bytecount size); 383 void dec_lrecord_string_data_stats (Bytecount size);
385 void inc_lrecord_stats (Bytecount size, const struct lrecord_header *h); 384 void inc_lrecord_stats (Bytecount size, const struct lrecord_header *h);
386 void dec_lrecord_stats (Bytecount size_including_overhead, 385 void dec_lrecord_stats (Bytecount size_including_overhead,
387 const struct lrecord_header *h); 386 const struct lrecord_header *h);
388 #endif /* MC_ALLOC_TYPE_STATS */ 387 #endif /* ALLOC_TYPE_STATS */
389 388
390 #ifdef MC_ALLOC
391 /* Tell mc-alloc how to call a finalizer. */ 389 /* Tell mc-alloc how to call a finalizer. */
392 #define MC_ALLOC_CALL_FINALIZER(ptr) \ 390 #define MC_ALLOC_CALL_FINALIZER(ptr) \
393 { \ 391 { \
394 Lisp_Object MCACF_obj = wrap_pointer_1 (ptr); \ 392 Lisp_Object MCACF_obj = wrap_pointer_1 (ptr); \
395 struct lrecord_header *MCACF_lheader = XRECORD_LHEADER (MCACF_obj); \ 393 struct lrecord_header *MCACF_lheader = XRECORD_LHEADER (MCACF_obj); \