# HG changeset patch # User james # Date 1150740619 0 # Node ID fd2936bbfc5f4dd91965f5b72e8bb7fd8ce4dcf0 # Parent 7f34da25d8711717cde3f59792b3144fbc5ab9ad [xemacs-hg @ 2006-06-19 18:10:17 by james] Don't make the stats arrays bigger than they need to be. diff -r 7f34da25d871 -r fd2936bbfc5f src/ChangeLog --- a/src/ChangeLog Sun Jun 18 21:51:09 2006 +0000 +++ b/src/ChangeLog Mon Jun 19 18:10:19 2006 +0000 @@ -1,3 +1,9 @@ +2006-06-16 Jerry James + + * alloc.c: Don't add MODULE_DEFINABLE_TYPE_COUNT to + countof (lrecord_implementations_table); the latter is already big + enough. + 2006-06-18 Aidan Kehoe * event-xlike-inc.c: diff -r 7f34da25d871 -r fd2936bbfc5f src/alloc.c --- a/src/alloc.c Sun Jun 18 21:51:09 2006 +0000 +++ b/src/alloc.c Mon Jun 19 18:10:19 2006 +0000 @@ -508,8 +508,7 @@ int instances_in_use; int bytes_in_use; int bytes_in_use_including_overhead; -} lrecord_stats [countof (lrecord_implementations_table) - + MODULE_DEFINABLE_TYPE_COUNT]; +} lrecord_stats [countof (lrecord_implementations_table)]; void init_lrecord_stats () @@ -554,8 +553,7 @@ { int i; int size = 0; - for (i = 0; i < (countof (lrecord_implementations_table) - + MODULE_DEFINABLE_TYPE_COUNT); i++) + for (i = 0; i < countof (lrecord_implementations_table); i++) size += lrecord_stats[i].bytes_in_use; return size; } @@ -3433,8 +3431,7 @@ int instances_freed; int bytes_freed; int instances_on_free_list; -} lcrecord_stats [countof (lrecord_implementations_table) - + MODULE_DEFINABLE_TYPE_COUNT]; +} lcrecord_stats [countof (lrecord_implementations_table)]; static void tick_lcrecord_stats (const struct lrecord_header *h, int free_p) @@ -4428,8 +4425,7 @@ #ifdef NEW_GC - for (i = 0; i < (countof (lrecord_implementations_table) - + MODULE_DEFINABLE_TYPE_COUNT); i++) + for (i = 0; i < countof (lrecord_implementations_table); i++) { if (lrecord_stats[i].instances_in_use != 0) {