- /*
- * Don't abut at all. Make a new entry
- * and check for map overflow.
- */
- do {
- t = bp->m_addr;
- bp->m_addr = addr;
- addr = t;
- t = bp->m_size;
- bp->m_size = size;
- bp++;
- } while (size = t);
- /*
- * Segment at bp is to be the delimiter;
- * If there is not room for it
- * then the table is too full
- * and we must discard something.
- */
- if (bp+1 > mp->m_limit) {
- /*
- * Back bp up to last available segment.
- * which contains a segment already and must
- * be made into the delimiter.
- * Discard second to last entry,
- * since it is presumably smaller than the last
- * and move the last entry back one.
- */
- bp--;
-#ifdef notdef
- printf("%s: rmap ovflo, lost [%d,%d)\n", mp->m_name,
- (bp-1)->m_addr, (bp-1)->m_addr+(bp-1)->m_size);
+ if (xtext == NULL)
+ xtext = (struct text *)calloc(ntext, sizeof (struct text));
+ if (kprocp == NULL)
+ kprocp = (struct proc *)calloc(nproc, sizeof (struct proc));
+ if (usrpt != NULL)
+ return(1);
+ usrpt = (struct pte *)nlst[X_USRPT].n_value;
+ Usrptma = (struct pte *)nlst[X_USRPTMAP].n_value;
+ if (pt == NULL)
+ pt = (struct p_times *)malloc(nproc * sizeof (struct p_times));
+ return(1);
+}
+
+fetchswap()
+{
+
+ if (nlst[X_PROC].n_type == 0)
+ return;
+ if (kprocp == NULL) {
+ kprocp = (struct proc *)malloc(sizeof (*kprocp) * nproc);
+ if (kprocp == NULL)
+ return;
+ }
+ lseek(kmem, procp, L_SET);
+ if (read(kmem, kprocp, sizeof (struct proc) * nproc) !=
+ sizeof (struct proc) * nproc) {
+ error("couldn't read proc table");
+ return;
+ }
+ if (xtext == NULL) {
+ xtext = (struct text *)calloc(ntext, sizeof (struct text));
+ if (xtext == NULL)
+ return;
+ }
+ lseek(kmem, textp, L_SET);
+ if (read(kmem, xtext, ntext * sizeof (struct text)) !=
+ sizeof (struct text) * ntext)
+ error("couldn't read text table");
+}
+
+#ifdef vax
+char *devnames[] =
+ { "hp", "ht", "up", "rk", "sw", "tm", "ts", "mt", "tu", "ra", "ut",
+ "rb", "rx", "rl" };