equal
deleted
inserted
replaced
93 KMEM_CBRC_DONT_KNOW |
93 KMEM_CBRC_DONT_KNOW |
94 } kmem_cbrc_t; |
94 } kmem_cbrc_t; |
95 |
95 |
96 #ifdef _KERNEL |
96 #ifdef _KERNEL |
97 |
97 |
|
98 /* |
|
99 * Helps clients implementing the move() callback to recognize known objects by |
|
100 * testing a client-designated pointer member. Takes advantage of the fact that |
|
101 * any scribbling to freed memory done by kmem is guaranteed to set one of the |
|
102 * two low order bits. |
|
103 */ |
|
104 #define POINTER_IS_VALID(p) (!((uintptr_t)(p) & 0x3)) |
|
105 #define POINTER_INVALIDATE(pp) (*(pp) = (void *)((uintptr_t)(*(pp)) | 0x1)) |
|
106 |
98 extern int kmem_ready; |
107 extern int kmem_ready; |
99 extern pgcnt_t kmem_reapahead; |
108 extern pgcnt_t kmem_reapahead; |
100 |
109 |
101 extern void kmem_init(void); |
110 extern void kmem_init(void); |
102 extern void kmem_thread_init(void); |
111 extern void kmem_thread_init(void); |