#pragma once
#include "common.h"
static const size_t PAGE_SIZE = (1 << 12);

void alloc_init();
void *alloc(size_t size);
void dealloc(void *arg, size_t size);

static inline u64 virt_to_phys(void *virt) { return (u64)virt - hhdm_offset; }

static inline void *phys_to_virt(u64 phys) {
  return (void *)(phys + hhdm_offset);
}

