#include <euler/heap.hpp>

void operator delete(void *ptr) {
  euler::dealloc((uint8_t *)ptr - 8, *(uint64_t *)((uint8_t *)ptr - 8));
}

void operator delete(void *ptr, uint64_t) {
  euler::dealloc((uint8_t *)ptr - 8, *(uint64_t *)((uint8_t *)ptr - 8));
}

void operator delete[](void *ptr) {
  euler::dealloc((uint8_t *)ptr - 8, *(uint64_t *)((uint8_t *)ptr - 8));
}

void operator delete[](void *ptr, uint64_t) {
  euler::dealloc((uint8_t *)ptr - 8, *(uint64_t *)((uint8_t *)ptr - 8));
}
