From 5053292ac8e60455f8aab2616fa231f4df72383a Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 29 Jan 1995 06:23:34 +0000 Subject: [PATCH] Define MAXARCS correctly. It has nothing to do with HISTCOUNTER, and overflowed when I enlarged HISTCOUNTER to u_int. --- sys/sys/gmon.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/sys/gmon.h b/sys/sys/gmon.h index bd1c9004893c..574458466b36 100644 --- a/sys/sys/gmon.h +++ b/sys/sys/gmon.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)gmon.h 8.2 (Berkeley) 1/4/94 - * $Id$ + * $Id: gmon.h,v 1.2 1994/08/02 07:53:02 davidg Exp $ */ #ifndef _SYS_GMON_H_ @@ -97,7 +97,12 @@ struct gmonhdr { */ #define ARCDENSITY 2 #define MINARCS 50 -#define MAXARCS ((1 << (8 * sizeof(HISTCOUNTER))) - 2) + +/* + * Limit on the number of arcs to so that arc numbers can be stored in + * `*froms' and stored and incremented without overflow in links. + */ +#define MAXARCS (((u_long)1 << (8 * sizeof(u_short))) - 2) struct tostruct { u_long selfpc;