aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/gmon.h
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1995-01-29 06:23:34 +0000
committerBruce Evans <bde@FreeBSD.org>1995-01-29 06:23:34 +0000
commit5053292ac8e60455f8aab2616fa231f4df72383a (patch)
treea3bff026cdbb396b0d36747962cd503bdc02c461 /sys/sys/gmon.h
parente45d35c3f83859dbb0d9d7a58f1b8326d7bcb0b9 (diff)
downloadsrc-5053292ac8e60455f8aab2616fa231f4df72383a.tar.gz
src-5053292ac8e60455f8aab2616fa231f4df72383a.zip
Define MAXARCS correctly. It has nothing to do with HISTCOUNTER, and
overflowed when I enlarged HISTCOUNTER to u_int.
Notes
Notes: svn path=/head/; revision=6010
Diffstat (limited to 'sys/sys/gmon.h')
-rw-r--r--sys/sys/gmon.h9
1 files 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;