HomeSort by relevance Sort by last modified time
    Searched defs:new (Results 51 - 75 of 452) sorted by null

1 23 4 5 6 7 8 91011>>

  /ndk/tests/device/test-stlport_shared-exception/jni/
new1_4.cpp 10 #include <new>
15 void* operator new(size_t size, double = 0.0) { return ::operator new(size);}
20 int main() { try { new A; } catch(...) {} }
new23.cpp 6 inline void *operator new (size_t, void *p) throw () { return p; }
13 unsigned *data = new unsigned[2 * num];
16 (i % 2 == 0) ? new (ptr) unsigned (2) : new (ptr++) unsigned (1);
new6.cpp 2 // Test that we properly default-initialize the new int when () is given.
4 #include <new>
11 void *operator new (size_t size) throw (bad_alloc)
21 int *p = new int();
operators23.cpp 3 // opr-new file
6 // Subject: g++-2.3.1 : Incorrectly calls overloaded operator new
17 void *operator new(size_t size) throw();
25 void *blah::operator new(size_t size) throw(){
34 blahPtr = new blah[100];
operators27.cpp 3 // opr-new file
6 // Subject: G++ 2.4.3 and operator new
11 #include <new>
16 void * operator new(size_t, const std::nothrow_t&) throw() { FLAG=1; return 0; }
29 K * pK = new (std::nothrow) K( 10);
  /ndk/tests/device/test-stlport_static-exception/jni/
new1_4.cpp 10 #include <new>
15 void* operator new(size_t size, double = 0.0) { return ::operator new(size);}
20 int main() { try { new A; } catch(...) {} }
new23.cpp 6 inline void *operator new (size_t, void *p) throw () { return p; }
13 unsigned *data = new unsigned[2 * num];
16 (i % 2 == 0) ? new (ptr) unsigned (2) : new (ptr++) unsigned (1);
new6.cpp 2 // Test that we properly default-initialize the new int when () is given.
4 #include <new>
11 void *operator new (size_t size) throw (bad_alloc)
21 int *p = new int();
operators23.cpp 3 // opr-new file
6 // Subject: g++-2.3.1 : Incorrectly calls overloaded operator new
17 void *operator new(size_t size) throw();
25 void *blah::operator new(size_t size) throw(){
34 blahPtr = new blah[100];
operators27.cpp 3 // opr-new file
6 // Subject: G++ 2.4.3 and operator new
11 #include <new>
16 void * operator new(size_t, const std::nothrow_t&) throw() { FLAG=1; return 0; }
29 K * pK = new (std::nothrow) K( 10);
  /external/clang/test/CXX/expr/expr.unary/expr.new/
p19.cpp 4 // Operator delete template for placement new with global lookup
9 static void* operator new(size_t) {
19 // Using the global operator new suppresses the search for a
21 ::new X0<2>;
23 new X0<3>; // expected-note 2{{instantiation}}
26 // Operator delete template for placement new[] with global lookup
31 static void* operator new[](size_t) {
41 // Using the global operator new suppresses the search for a
43 ::new X1<2> [17];
45 new X1<3> [17]; // expected-note 2{{instantiation}
    [all...]
  /external/clang/test/SemaCXX/
new-null.cpp 8 void *operator new(size_t n) {
9 return nullptr; // expected-warning {{'operator new' should not return a null pointer unless it is declared 'throw()' or 'noexcept'}}
11 void *operator new[](size_t n) noexcept {
19 void *operator new(size_t n) throw() {
22 void *operator new[](size_t n) {
25 // expected-warning@-2 {{'operator new[]' should not return a null pointer unless it is declared 'throw()' or 'noexcept'}}
27 // expected-warning-re@-4 {{'operator new[]' should not return a null pointer unless it is declared 'throw()'{{$}}}}
33 void *operator new(size_t n) {
39 // expected-warning@-5 {{'operator new' should not return a null pointer unless it is declared 'throw()'}}
42 void *operator new[](size_t n)
    [all...]
warn-new-overaligned.cpp 15 new Test; // expected-warning {{type 'test1::Test' requires 256 bytes of alignment and the default allocator only guarantees}}
16 new Test[10]; // expected-warning {{type 'test1::Test' requires 256 bytes of alignment and the default allocator only guarantees}}
28 new Test; // expected-warning {{type 'test2::Test' requires 256 bytes of alignment and the default allocator only guarantees}}
29 new Test[10]; // expected-warning {{type 'test2::Test' requires 256 bytes of alignment and the default allocator only guarantees}}
40 void* operator new(unsigned long) {
41 return 0; // expected-warning {{'operator new' should not return a null pointer unless it is declared 'throw()'}}
49 new Test;
50 new Test[10]; // expected-warning {{type 'test3::Test' requires 256 bytes of alignment and the default allocator only guarantees}}
61 void* operator new[](unsigned long) {
62 return 0; // expected-warning {{'operator new[]' should not return a null pointer unless it is declared 'throw()'}
    [all...]
  /external/compiler-rt/lib/msan/
msan_new_delete.cc 12 // Interceptors for operators new and delete.
24 // Fake std::nothrow_t to avoid including <new>.
35 void *operator new(size_t size) { OPERATOR_NEW_BODY; }
37 void *operator new[](size_t size) { OPERATOR_NEW_BODY; }
39 void *operator new(size_t size, std::nothrow_t const&) { OPERATOR_NEW_BODY; }
41 void *operator new[](size_t size, std::nothrow_t const&) { OPERATOR_NEW_BODY; }
  /external/compiler-rt/lib/tsan/rtl/
tsan_new_delete.cc 12 // Interceptors for operators new and delete.
43 void *operator new(__sanitizer::uptr size);
44 void *operator new(__sanitizer::uptr size) {
49 void *operator new[](__sanitizer::uptr size);
50 void *operator new[](__sanitizer::uptr size) {
55 void *operator new(__sanitizer::uptr size, std::nothrow_t const&);
56 void *operator new(__sanitizer::uptr size, std::nothrow_t const&) {
61 void *operator new[](__sanitizer::uptr size, std::nothrow_t const&);
62 void *operator new[](__sanitizer::uptr size, std::nothrow_t const&) {
  /external/compiler-rt/test/asan/TestCases/Posix/
new_array_cookie_with_new_from_class.cc 1 // Test that we do not poison the array cookie if the operator new is defined
6 #include <new>
12 void *operator new(size_t s) { return Allocate(s); }
13 void *operator new[] (size_t s) { return Allocate(s); }
18 return allocated = ::new char[s];
26 return new Foo[n];
  /external/libcxx/src/
new.cpp 1 //===--------------------------- new.cpp ----------------------------------===//
14 #include "new"
25 // shared library. The global holding the current new handler is
40 // Implement all new and delete operators as weak definitions
46 operator new(std::size_t size)
73 operator new(size_t size, const std::nothrow_t&) _NOEXCEPT
80 p = ::operator new(size);
92 operator new[](size_t size)
97 return ::operator new(size);
102 operator new[](size_t size, const std::nothrow_t&) _NOEXCEP
    [all...]
  /external/libcxxabi/src/
cxa_new_delete.cpp 9 // This file implements the new and delete operators.
14 #include <new>
18 [new.delete.single]
36 operator new(std::size_t size)
62 [new.delete.single]
64 Calls operator new(size). If the call returns normally, returns the result of
69 operator new(size_t size, const std::nothrow_t&)
79 p = ::operator new(size);
88 [new.delete.array]
90 Returns operator new(size)
    [all...]
  /external/valgrind/massif/tests/
overloaded-new.cpp 1 // operator new(unsigned)
2 // operator new[](unsigned)
3 // operator new(unsigned, std::nothrow_t const&)
4 // operator new[](unsigned, std::nothrow_t const&)
8 #include <new>
17 __attribute__((noinline)) void* operator new (std::size_t n) throw (std::bad_alloc)
22 __attribute__((noinline)) void* operator new (std::size_t n, std::nothrow_t const &) throw ()
27 __attribute__((noinline)) void* operator new[] (std::size_t n) throw (std::bad_alloc)
32 __attribute__((noinline)) void* operator new[] (std::size_t n, std::nothrow_t const &) throw ()
49 s* p1 = new s
    [all...]
  /ndk/sources/cxx-stl/llvm-libc++/libcxx/src/
new.cpp 1 //===--------------------------- new.cpp ----------------------------------===//
14 #include "new"
25 // shared library. The global holding the current new handler is
38 // libc++abi provides operator new and delete as part of the abi layer.
41 // Implement all new and delete operators as weak definitions
47 operator new(std::size_t size)
74 operator new(size_t size, const std::nothrow_t&) _NOEXCEPT
81 p = ::operator new(size);
93 operator new[](size_t size)
98 return ::operator new(size)
    [all...]
  /ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/
cxa_new_delete.cpp 9 // This file implements the new and delete operators.
14 #include <new>
18 [new.delete.single]
36 operator new(std::size_t size)
62 [new.delete.single]
64 Calls operator new(size). If the call returns normally, returns the result of
69 operator new(size_t size, const std::nothrow_t&)
79 p = ::operator new(size);
88 [new.delete.array]
90 Returns operator new(size)
    [all...]
  /art/runtime/base/
arena_object.h 26 // Parent for arena allocated objects giving appropriate new and delete operators.
30 // Allocate a new ArenaObject of 'size' bytes in the Arena.
31 void* operator new(size_t size, ArenaAllocator* allocator) {
35 static void* operator new(size_t size, ScopedArenaAllocator* arena) {
44 // NOTE: Providing placement new (and matching delete) for constructing container elements.
45 ALWAYS_INLINE void* operator new(size_t, void* ptr) noexcept { return ptr; }
50 // Parent for arena allocated objects that get deleted, gives appropriate new and delete operators.
54 // Allocate a new ArenaObject of 'size' bytes in the Arena.
55 void* operator new(size_t size, ArenaAllocator* allocator) {
59 static void* operator new(size_t size, ScopedArenaAllocator* arena)
    [all...]
  /external/ipsec-tools/src/racoon/
throttle.c 124 * No match, if auth failed, allocate a new throttle entry
144 time_t new; local
147 new = remaining + isakmp_cfg_config.auth_throttle;
149 if (new > THROTTLE_PENALTY_MAX)
150 new = THROTTLE_PENALTY_MAX;
152 te->penalty = now + new;
vmbuf.c 124 vchar_t *new; local
131 if ((new = vmalloc(src->l)) == NULL)
134 memcpy(new->v, src->v, src->l);
136 return new;
  /external/libcxx/test/std/localization/locales/locale/locale.cons/
assign.pass.cpp 11 // UNSUPPORTED: sanitizer-new-delete
19 #include <new>
25 void* operator new(std::size_t s) throw(std::bad_alloc)

Completed in 1275 milliseconds

1 23 4 5 6 7 8 91011>>