4 * This file is part of the Valgrind port to L4Re.
6 * (c) 2009-2010 Aaron Pohle <apohle@os.inf.tu-dresden.de>,
7 * Bjoern Doebel <doebel@os.inf.tu-dresden.de>
8 * economic rights: Technische Universitaet Dresden (Germany)
11 void *operator new(unsigned size) L4_NOTHROW
13 VG_(debugLog)(5, "vcap", "op new(size = %u)\n", size);
15 return VG_(malloc)((char *)"op::new", size);
19 void *operator new(unsigned size, void *addr) L4_NOTHROW
25 void operator delete(void *p) L4_NOTHROW
33 /* VG_(malloc)/VG_(free)-based allocator for cxx:: data types */
34 template <typename TYPE>
35 class Valgrind_allocator
38 enum { can_free = true };
40 Valgrind_allocator() throw() { }
41 Valgrind_allocator(Valgrind_allocator const &) throw() { }
43 ~Valgrind_allocator() throw() { }
47 return static_cast<TYPE*>(VG_(malloc)((HChar*)"vg::alloc", sizeof(TYPE)));
50 //void free(TYPE* ptr) throw()
51 void free(void* ptr) throw()