adapted sizes somewhat, made facility to print memory statistics
This commit is contained in:
parent
a7b7fa4162
commit
0300bbf5cb
4 changed files with 41 additions and 15 deletions
|
@ -15,23 +15,23 @@
|
||||||
#define K 1024L
|
#define K 1024L
|
||||||
|
|
||||||
#if BIGMACHINE
|
#if BIGMACHINE
|
||||||
mems[ALLOEMIT + 0].mem_left = 32 * K;
|
#define INCRSIZE 8192
|
||||||
mems[ALLOEMIT + 1].mem_left = 8 * K;
|
mems[ALLOEMIT + 0].mem_left = 64 * K;
|
||||||
|
mems[ALLOEMIT + 1].mem_left = 4 * K;
|
||||||
mems[ALLOEMIT + 2].mem_left = 16 * K;
|
mems[ALLOEMIT + 2].mem_left = 16 * K;
|
||||||
mems[ALLORELO].mem_left = 32 * K;
|
mems[ALLORELO].mem_left = 24 * K;
|
||||||
mems[ALLOLOCL].mem_left = 32 * K;
|
mems[ALLOLOCL].mem_left = 16 * K;
|
||||||
mems[ALLOGLOB].mem_left = 32 * K;
|
mems[ALLOGLOB].mem_left = 16 * K;
|
||||||
mems[ALLOLCHR].mem_left = 32 * K;
|
mems[ALLOLCHR].mem_left = 16 * K;
|
||||||
mems[ALLOGCHR].mem_left = 32 * K;
|
mems[ALLOGCHR].mem_left = 16 * K;
|
||||||
#ifdef SYMDBUG
|
#ifdef SYMDBUG
|
||||||
mems[ALLODBUG].mem_left = 32 * K;
|
mems[ALLODBUG].mem_left = 32 * K;
|
||||||
#endif SYMDBUG
|
#endif SYMDBUG
|
||||||
mems[ALLOSYMB].mem_left = 4 * K;
|
mems[ALLOSYMB].mem_left = 8 * K;
|
||||||
mems[ALLOARCH].mem_left = 1 * K;
|
mems[ALLOARCH].mem_left = 4 * K;
|
||||||
mems[ALLOMODL].mem_left = 32 * K;
|
mems[ALLOMODL].mem_left = 64 * K;
|
||||||
mems[ALLORANL].mem_left = 4 * K;
|
mems[ALLORANL].mem_left = 8 * K;
|
||||||
#else
|
#else
|
||||||
#undef INCRSIZE
|
|
||||||
#define INCRSIZE 256
|
#define INCRSIZE 256
|
||||||
mems[ALLOEMIT + 0].mem_left = 8 * K;
|
mems[ALLOEMIT + 0].mem_left = 8 * K;
|
||||||
mems[ALLOEMIT + 1].mem_left = 2 * K;
|
mems[ALLOEMIT + 1].mem_left = 2 * K;
|
||||||
|
|
|
@ -19,6 +19,9 @@ static char rcsid[] = "$Header$";
|
||||||
#include "orig.h"
|
#include "orig.h"
|
||||||
|
|
||||||
extern bool incore;
|
extern bool incore;
|
||||||
|
#ifndef NOSTATISTICS
|
||||||
|
int statistics;
|
||||||
|
#endif
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
int DEB = 0;
|
int DEB = 0;
|
||||||
#endif
|
#endif
|
||||||
|
@ -37,6 +40,9 @@ static change_names();
|
||||||
static bool tstbit();
|
static bool tstbit();
|
||||||
static second_pass();
|
static second_pass();
|
||||||
static pass2();
|
static pass2();
|
||||||
|
#ifndef NOSTATISTICS
|
||||||
|
static do_statistics();
|
||||||
|
#endif
|
||||||
|
|
||||||
main(argc, argv)
|
main(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
|
@ -44,6 +50,9 @@ main(argc, argv)
|
||||||
{
|
{
|
||||||
initializations(argc, argv);
|
initializations(argc, argv);
|
||||||
first_pass(argv);
|
first_pass(argv);
|
||||||
|
#ifndef NOSTATISTICS
|
||||||
|
do_statistics();
|
||||||
|
#endif
|
||||||
freeze_core();
|
freeze_core();
|
||||||
evaluate();
|
evaluate();
|
||||||
beginoutput();
|
beginoutput();
|
||||||
|
@ -52,6 +61,22 @@ main(argc, argv)
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NOSTATISTICS
|
||||||
|
static
|
||||||
|
do_statistics()
|
||||||
|
{
|
||||||
|
register struct memory *m = mems;
|
||||||
|
|
||||||
|
while (m <= &mems[NMEMS-1]) {
|
||||||
|
fprintf(stderr, "mem %d: full %lx, free %lx\n",
|
||||||
|
m - mems,
|
||||||
|
(long) m->mem_full,
|
||||||
|
(long) m->mem_left);
|
||||||
|
m++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
char *progname; /* Name this program was invoked with. */
|
char *progname; /* Name this program was invoked with. */
|
||||||
int passnumber; /* Pass we are in. */
|
int passnumber; /* Pass we are in. */
|
||||||
struct outhead outhead; /* Header of final output file. */
|
struct outhead outhead; /* Header of final output file. */
|
||||||
|
@ -193,6 +218,9 @@ first_pass(argv)
|
||||||
if (searchname(*argv, h) == (struct outname *)0)
|
if (searchname(*argv, h) == (struct outname *)0)
|
||||||
entername(makename(*argv), h);
|
entername(makename(*argv), h);
|
||||||
break;
|
break;
|
||||||
|
case 'S':
|
||||||
|
statistics = 1;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
warning("bad flag letter %c", *argp);
|
warning("bad flag letter %c", *argp);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -60,7 +60,7 @@ sbreak(incr)
|
||||||
refused = incr;
|
refused = incr;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
BASE = sbrk(0);
|
BASE += inc;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
#define ALLORANL (ALLOMODL + 1) /* Ranlib information. */
|
#define ALLORANL (ALLOMODL + 1) /* Ranlib information. */
|
||||||
#define NMEMS (ALLORANL + 1)
|
#define NMEMS (ALLORANL + 1)
|
||||||
|
|
||||||
#define INCRSIZE 1024
|
|
||||||
|
|
||||||
typedef long ind_t;
|
typedef long ind_t;
|
||||||
#define BADOFF ((ind_t)-1)
|
#define BADOFF ((ind_t)-1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue