1 //===-- sanitizer_placement_new.h -------------------------------*- C++ -*-===//
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
6 //===----------------------------------------------------------------------===//
8 // This file is shared between AddressSanitizer and ThreadSanitizer
11 // The file provides 'placement new'.
12 // Do not include it into header files, only into source files.
13 //===----------------------------------------------------------------------===//
14 #ifndef SANITIZER_PLACEMENT_NEW_H
15 #define SANITIZER_PLACEMENT_NEW_H
17 #include "sanitizer_internal_defs.h"
19 namespace __sanitizer
{
20 #if (SANITIZER_WORDSIZE == 64) || defined(__APPLE__)
21 typedef uptr operator_new_ptr_type
;
23 typedef u32 operator_new_ptr_type
;
25 } // namespace __sanitizer
27 inline void *operator new(__sanitizer::operator_new_ptr_type sz
, void *p
) {
31 #endif // SANITIZER_PLACEMENT_NEW_H