Removed # in commands, changed mechanism for computing mem used
This commit is contained in:
parent
50e8baa624
commit
44a1c5620c
|
@ -9,6 +9,8 @@ static char rcsid[]= "$Header$";
|
|||
#include <stdio.h>
|
||||
|
||||
char *filename;
|
||||
char *beg_sbrk;
|
||||
extern char *sbrk();
|
||||
|
||||
main(argc,argv) char **argv; {
|
||||
extern int nerrors;
|
||||
|
@ -16,6 +18,8 @@ main(argc,argv) char **argv; {
|
|||
extern int tabledebug;
|
||||
extern int verbose;
|
||||
|
||||
beg_sbrk = sbrk(0);
|
||||
|
||||
while (argc >1 && argv[1][0]=='-') {
|
||||
switch(argv[1][1]) {
|
||||
case 'c':
|
||||
|
|
|
@ -891,7 +891,7 @@ used(resource,use,max) char *resource; {
|
|||
}
|
||||
|
||||
statistics() {
|
||||
extern char *end,*sbrk();
|
||||
extern char *beg_sbrk,*sbrk();
|
||||
extern int nnodes, maxempatlen,maxrule;
|
||||
|
||||
used("Registers",nregs,MAXREGS);
|
||||
|
@ -915,5 +915,5 @@ statistics() {
|
|||
used("Pat bytes",npatbytes+1,MAXPATBYTES);
|
||||
if (tabledebug)
|
||||
used("Source lines",maxline,MAXSOURCELINES);
|
||||
fprintf(stderr,"%ldK heap used\n",((long) (sbrk(0)-(char *) &end+1023))/1024);
|
||||
fprintf(stderr,"%ldK heap used\n",((long) (sbrk(0)-beg_sbrk+1023))/1024);
|
||||
}
|
||||
|
|
|
@ -71,8 +71,7 @@ opr:
|
|||
-make pr|opr
|
||||
|
||||
depend: $(CFILES) scan.c
|
||||
sed '/^#DEPENDENCIES/,$$d' Makefile >Makefile.new
|
||||
echo '#DEPENDENCIES' >>Makefile.new
|
||||
rm_deps Makefile >Makefile.new
|
||||
for i in $(CFILES) ; do \
|
||||
echo "`basename $$i .c`.$$(SUF): $$i" >> Makefile.new ; \
|
||||
echo ' $$(CC) -c $$(CFLAGS)' $$i >> Makefile.new ; \
|
||||
|
|
Loading…
Reference in a new issue