Fix tabbing.... Please fix your editors so they do tabbing correctly!!! (Spaces...
[IRC.git] / Robust / src / Runtime / DSTM / interface / gCollect.h
1 #ifndef _GCOLLECT_H
2 #define _GCOLLECT_H
3
4 #include "dstm.h"
5
6 /***********************************
7  ****** Global constants **********
8  **********************************/
9
10 #define STALE_MINTHRESHOLD 10 //minimum size
11
12 #define STALE_MAXTHRESHOLD 40 //ugly hack..if you make this too small things
13 // will fail in odd subtle ways
14
15 #define DEFAULT_OBJ_STORE_SIZE (4194304-16) //just a little less the 4MB
16 #define PREFETCH_FLUSH_THRESHOLD 30 //MINIMUM SIZE BEFORE FLUSHING
17 #define STALL_THRESHOLD 15 //number of prefetches stores before we can start freeing old ones
18
19
20
21 /*********************************
22  ********* Global variables ******
23  ********************************/
24 typedef struct prefetchNodeInfo {
25   objstr_t *oldptr;
26   objstr_t *newptr;
27   int os_count;
28
29   objstr_t *oldstale;
30   objstr_t *newstale;
31   int stale_count;
32   int stall;
33
34 } prefetchNodeInfo_t;
35
36 /********************************
37  ******** Functions ************
38  *******************************/
39 void *prefetchobjstrAlloc(unsigned int size);
40 void initializePCache();
41 void clearBlock(objstr_t *);
42 objstr_t *allocateNew(unsigned int size);
43 objstr_t * getObjStr(unsigned int size);
44 #endif