#ifndef IKARUS_AT #define IKARUS_AT #include #include #include #define segment_pages (8 * sizeof(unsigned int)) typedef struct ikat_ll{ unsigned char* base; size_t size; struct ikat_ll* next; } ikat_ll; typedef struct { unsigned int* alloc_table; ikat_ll** lls; int lls_count; unsigned char* ap; unsigned char* ep; ikat_ll* llcache; } ikat; ikat* ikat_make_allocation_table(unsigned int types); void ikat_free_allocation_table(ikat*); unsigned char* ikat_map_bigpage(ikat*, size_t size); unsigned char* ikat_map(ikat*, size_t size, unsigned int type); unsigned char* ikat_map_code(ikat*, size_t size, unsigned int type); void ikat_unmap(ikat*, unsigned char* addr, size_t size); #endif