#include <os/cpp_util.h>

os/cpp_util.h Kernel.framework

2 macros · 1 function

macroOS_HAS_NULLPTR

#define OS_HAS_NULLPTR 1

macroOS_HAS_RVALUE_REFERENCES

#define OS_HAS_RVALUE_REFERENCES 1

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.