23 |
|
|
24 |
/* alignment required for pointers */ |
/* alignment required for pointers */ |
25 |
#ifndef PTR_ALIGN |
#ifndef PTR_ALIGN |
26 |
#define PTR_ALIGN (sizeof(long *)) |
#define PTR_ALIGN SIZEOF_LONG |
27 |
#endif |
#endif |
28 |
|
|
29 |
#define ROUND_UP_PTR(n) (((long)(n) + (PTR_ALIGN-1)) & ~(PTR_ALIGN-1)) |
#define ROUND_UP_PTR(n) (((long)(n) + (PTR_ALIGN-1)) & ~(PTR_ALIGN-1)) |
30 |
#define ROUND_DOWN_PTR(n) (((long)(n) & ~(PTR_ALIGN-1))) |
#define ROUND_DOWN_PTR(n) (((long)(n) & ~(PTR_ALIGN-1))) |
31 |
|
|
32 |
/* alignment required for contiguous pointers */ |
/* alignment required for contiguous pointers */ |
33 |
#define CPTR_ALIGN (PTR_ALIGN < sizeof(struct contblock) ? sizeof(struct contblock) : PTR_ALIGN) |
#if PTR_ALIGN < SIZEOF_CONTBLOCK |
34 |
|
#define CPTR_ALIGN SIZEOF_CONTBLOCK |
35 |
|
#else |
36 |
|
#define CPTR_ALIGN PTR_ALIGN |
37 |
|
#endif |
38 |
|
/* #define CPTR_ALIGN (PTR_ALIGN < sizeof(struct contblock) ? sizeof(struct contblock) : PTR_ALIGN) */ |
39 |
|
|
40 |
#define ROUND_UP_PTR_CONT(n) (((long)(n) + (CPTR_ALIGN-1)) & ~(CPTR_ALIGN-1)) |
#define ROUND_UP_PTR_CONT(n) (((long)(n) + (CPTR_ALIGN-1)) & ~(CPTR_ALIGN-1)) |
41 |
#define ROUND_DOWN_PTR_CONT(n) (((long)(n) & ~(CPTR_ALIGN-1))) |
#define ROUND_DOWN_PTR_CONT(n) (((long)(n) & ~(CPTR_ALIGN-1))) |
42 |
|
|
|
|
|
43 |
#ifdef SGC |
#ifdef SGC |
44 |
|
|
45 |
char sgc_type_map[MAXPAGE]; |
char sgc_type_map[MAXPAGE]; |