From 27f2a0aa1f0e2f612253ff026d8c4a92b06ac091 Mon Sep 17 00:00:00 2001 From: "warren.toomey" Date: Sat, 17 May 2008 02:31:35 +0000 Subject: [PATCH] Added definitions for NPROC and SWPSIZ, so that we can tweak the number of blocks reserved for swap at the end of the RF11. This goes with the change to the ecore.patch, so that we can swap up to 16K of process address space out to disk. --- tools/mkfs.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/mkfs.c b/tools/mkfs.c index ad7f223..973335e 100644 --- a/tools/mkfs.c +++ b/tools/mkfs.c @@ -11,8 +11,8 @@ * in the long run, have the ability to read from/write to * existing images, a la an ftp client. * - * $Revision: 1.21 $ - * $Date: 2008/05/06 09:22:07 $ + * $Revision: 1.22 $ + * $Date: 2008/05/17 02:30:05 $ */ #include @@ -34,6 +34,14 @@ #define NUMDIRECTBLKS 8 /* Only 8 direct blocks in an i-node */ #define BLKSPERINDIRECT 256 /* 256 block pointers in an indirect block */ +/* V1 UNIX reserves 64 blocks on the end of RF11 for kernel images, then + * SWPSIZ blocks per process for swap areas. + */ +#define KERNBLKS 64 /* Hard coded in V1 kernel source */ +#define SWPSIZ 33 /* Was hard-coded to 17, now 33 for C compiler */ +#define NPROC 16 /* Hard coded in V1 kernel source */ +#define RF_NOSWAPSIZE (RF_SIZE - KERNBLKS - (SWPSIZ*NPROC)) + struct v1inode { /* Format of 1st edition i-node */ uint16_t flags; uint8_t nlinks; @@ -708,7 +716,7 @@ int main(int argc, char *argv[]) fs_size = RK_SIZE; } else { disksize = RF_SIZE; - fs_size = RF_NOSAWPSIZE; + fs_size = RF_NOSWAPSIZE; makedevflag=1; }