#include <libkern/c++/safe_allocation.h>
libkern/c++/safe_allocation.h
macroXNU_LIBKERN_LIBKERN_CXX_SAFE_ALLOCATION_H
#define XNU_LIBKERN_LIBKERN_CXX_SAFE_ALLOCATION_H
functionoperator new
void* operator new( /* forward declaration needed for placement-new */ size_t, void* ) noexcept
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libkern/libkern/c++/safe_allocation.h, libkern/os/cpp_util.h
Placement operator new: returns the supplied pointer unchanged without allocating, so an object can be constructed at a caller-provided address. Declared in these headers only as a forward declaration for use when the <new> header is unavailable in the kernel environment; the freestanding C++ ABI supplies the trivial definition.