Coda Distributed File System
Macros | Enumerations | Functions | Variables
rdsinit.c File Reference
#include <assert.h>
#include <setjmp.h>
#include <stdlib.h>
#include <sys/file.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <rvm/rvm.h>
#include <rvm/rvm_segment.h>
#include <rvm/rds.h>
#include "rds_private.h"
Include dependency graph for rdsinit.c:

Macros

#define BZERO(D, L)   bzero((D), (L))
 
#define O_BINARY   0
 

Enumerations

enum  round_dir { UP , DOWN , NO_ROUND }
 

Functions

int main (int argc, char *argv[])
 

Variables

jmp_buf jmpbuf_quit
 
char * usage []
 
char * explain_datalen []
 
char * explain_saddr []
 
char * explain_hlen []
 
char * explain_slen []
 
char * explain_nl []
 
char * explain_chunk []
 
char * ortarg
 
int optind
 
int opterr
 
int optopt
 

Macro Definition Documentation

◆ BZERO

#define BZERO (   D,
 
)    bzero((D), (L))

◆ O_BINARY

#define O_BINARY   0

Enumeration Type Documentation

◆ round_dir

enum round_dir
Enumerator
UP 
DOWN 
NO_ROUND 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Variable Documentation

◆ explain_chunk

char* explain_chunk[]
Initial value:
= {
"6) chunksize\n",
" The free list are maintained in sizes of one chunk to n chunk,\n",
" where n is the number of free lists.\n",
" It must be an integral multiple of sizeof(char *) of your system,\n",
" and must at least be RDS_MIN_CHUNK_SIZE.\n",
" (chunksize=32 is a reasonable choice.)\n",
""
}

◆ explain_datalen

char* explain_datalen[]
Initial value:
= {
"1) length of data segment file/device\n",
" There will be two regions in the segment:\n",
" one is for the heap, the other is for the static.\n",
" Some extra space (usually one page) will also \n",
" be needed for the segment header.\n",
" Length of data segment must be a multiple of pagesize.\n",
" Please make sure you have enough space in your disk.\n",
""
}

◆ explain_hlen

char* explain_hlen[]
Initial value:
= {
"3) heap length\n",
" It is the size of the dynamic heap to be managed by RDS,\n",
" it must be an integral multiple of pagesize.\n",
""
}

◆ explain_nl

char* explain_nl[]
Initial value:
= {
"5) nlists\n",
" It is the number of free list used by RDS.\n",
" (nlist=100 is a reasonable choice.)\n",
""
}

◆ explain_saddr

char* explain_saddr[]
Initial value:
= {
"2) starting address of rvm\n",
" This is where heap and static will be mapped into virtual memory, it\n",
" must be larger than the largest possible break point of your\n",
" application, and it should not be in conflict other use of vm (such as\n",
" shared libraries). Also, it must be on a page boundary\n",
" (In CMU, we use 0x20000000 (536870912) with Linux and BSD44,\n",
" 0x70000000 (1879048192) with Mach and BSD44 without problem.)\n",
""
}

◆ explain_slen

char* explain_slen[]
Initial value:
= {
"4) static length\n",
" It is the size of the statically allocated location to be\n",
" managed by your application.\n",
" It must be an integral multiple of pagesize.\n",
""
}

◆ jmpbuf_quit

jmp_buf jmpbuf_quit

◆ opterr

int opterr

◆ optind

int optind
extern

◆ optopt

int optopt

◆ ortarg

char* ortarg
extern

◆ usage

void usage ( void  )
Initial value:
= {
"Usage: rdsinit [-f] log data_seg [ datalen saddr hlen slen nl chunk ] \n",
" where\n",
" -f supplied parameter are firm, do not ask for confirm\n",
" log is the name of log file/device\n",
" data_seg is the name of data segment file/device\n",
" datalen gives the length of data segment\n",
" saddr is the starting address of rvm\n",
" hlen is the heap length\n",
" slen is the static length\n",
" nl is the number of free list used by RDS\n",
" chunk is the chunksize\n",
""
}