Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion doc/CMake/EASTL_Project_Integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,16 @@ ${EASTL_ROOT_DIR}/doc/EASTL.natvis

### Overloading operator new[]

EASTL requires you to have an overload for the operator new[], here is an example that just forwards to global new[]:
EASTL requires you to have an overload for the operator new[], and an aligned overload, here is an example that just forwards to global new[]:

```c
void* __cdecl operator new[](size_t size, const char* name, int flags, unsigned debugFlags, const char* file, int line)
{
return new uint8_t[size];
}

void* __cdecl operator new[](size_t size, size_t alignment, size_t alignmentOffset, const char* pName, int flags, unsigned debugFlags, const char* file, int line)
{
return new (std::align_val_t(alignment)) uint8_t[size];
}
```