13 lines
302 B
C++
13 lines
302 B
C++
#include <euler/heap.hpp>
|
|
|
|
void *operator new(uint64_t size) {
|
|
void *ptr = euler::alloc(size + 8);
|
|
*(uint64_t *)ptr = size + 8;
|
|
return (uint8_t *)ptr + 8;
|
|
}
|
|
|
|
void *operator new[](uint64_t size) {
|
|
void *ptr = euler::alloc(size + 8);
|
|
*(uint64_t *)ptr = size + 8;
|
|
return (uint8_t *)ptr + 8;
|
|
}
|