Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
Implement operator delete with alignment support
Browse files Browse the repository at this point in the history
  • Loading branch information
EnderIce2 committed May 1, 2024
1 parent 72d29a1 commit 77a291d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions core/memory/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -696,3 +696,18 @@ void operator delete[](void *Pointer, long unsigned int Size)

free(Pointer);
}

void operator delete(void *Pointer, unsigned long Size, std::align_val_t Alignment)
{
assert(Pointer != nullptr);
assert(Size > 0);

memdbg("delete(%#lx, %d, %d)->[%s]",
Pointer, Size, Alignment,
KernelSymbolTable ? KernelSymbolTable->GetSymbol((uintptr_t)__builtin_return_address(0))
: "Unknown");

fixme("operator delete with alignment is not implemented");

free(Pointer);
}

0 comments on commit 77a291d

Please sign in to comment.