#pragma once #include namespace std { struct nothrow_t { explicit nothrow_t() = default; }; extern const nothrow_t nothrow; enum class align_val_t : usize { }; }; void* operator new(usize size, const std::nothrow_t&) noexcept; void* operator new[](usize size, const std::nothrow_t&) noexcept; void operator delete(void* ptr, usize size, std::align_val_t alignment) noexcept; extern Result allocate_pages_impl(usize count); extern Result release_pages_impl(void* address, usize count); Result malloc_impl(usize size, bool may_realloc = true, bool should_scrub = true); Result calloc_impl(usize nmemb, usize size, bool may_realloc = true); Result realloc_impl(void* ptr, usize size, bool may_realloc_again = true); Result free_impl(void* ptr); void dump_heap_usage();