SCCS-vsn: lib/libc/gmon/gmon.c 4.13
-static char *sccsid = "@(#)gmon.c 4.12 (Berkeley) %G%";
+static char *sccsid = "@(#)gmon.c 4.13 (Berkeley) %G%";
#ifdef DEBUG
#include <stdio.h>
#ifdef DEBUG
#include <stdio.h>
static char *s_lowpc = 0;
static char *s_highpc = 0;
static unsigned long s_textsize = 0;
static char *s_lowpc = 0;
static char *s_highpc = 0;
static unsigned long s_textsize = 0;
-static char *minsbrk = 0;
static int ssiz;
static char *sbuf;
static int ssiz;
static char *sbuf;
int monsize;
char *buffer;
char *sbrk();
int monsize;
char *buffer;
char *sbrk();
/*
* round lowpc and highpc to multiples of the density we're using
/*
* round lowpc and highpc to multiples of the density we're using
tos[0].link = 0;
monitor( lowpc , highpc , buffer , monsize , tolimit );
}
tos[0].link = 0;
monitor( lowpc , highpc , buffer , monsize , tolimit );
}
-
-/*
- * This is a stub for the "brk" system call, which we want to
- * catch so that it will not deallocate our data space.
- * (of which the program is not aware)
- */
-extern char *curbrk;
-
-brk(addr)
- char *addr;
-{
-
- if (addr < minsbrk)
- addr = minsbrk;
- asm(" chmk $17");
- asm(" jcc 1f");
- asm(" jmp cerror");
-asm("1:");
- curbrk = addr;
- return (0);
-}