00001 00013 #ifndef __VM_TYPES_H__ 00014 #define __VM_TYPES_H__ 00015 00016 #include <stdio.h> 00017 00023 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) 00024 00030 #define XFREE(stale) do { \ 00031 if (stale) { free ((void *) stale); \ 00032 stale = 0; } \ 00033 } while (0) 00034 00039 typedef void *(*thread_fn_t) (void *); 00040 00043 typedef unsigned short int uint16_t; 00044 00047 typedef unsigned int uint32_t; 00048 00055 struct page { 00057 uint16_t id; 00059 int present:1; 00061 int reference:1; 00063 int dirty:1; 00065 uint16_t frame_id; 00066 }; 00067 00068 typedef struct page page_t; 00069 00070 void *xmalloc(size_t); 00071 00072 #endif /* __VM_TYPES_H__ */
![]() |
Università degli studi di Urbino "Carlo Bo" |