Runtime for checker...
[repair.git] / Repair / RepairCompiler / MCC / Runtime / tmap.h
1 #ifndef TMAP_H
2 #define TMAP_H
3 class typeobject;
4
5 class typemap {
6  public:
7   typemap(typeobject *);
8   ~typemap();
9   void allocate(void *, int);
10   void deallocate(void *);
11   bool assertvalidmemory(void* low, void* high);
12   bool asserttype(void *ptr, void *high, int structure);
13   bool istype(void *ptr, void *high, int structure);
14   void reset();
15  private:
16   bool checkmemory(void* low, void* high);
17   bool checktype(bool doaction,void *ptr, int structure);
18   bool checktype(bool doaction, void *low, void *high,int structure, struct rbtree *ttree);
19   int findoffsetstructure(int s, int offset);
20   typeobject *size;
21   struct rbtree *alloctree;
22   struct rbtree *typetree;
23 };
24
25 class structuremap {
26   public:
27   structuremap(int s);
28   ~structuremap();
29   int str;
30   struct rbtree *typetree;
31 };
32 #endif