Mercurial > hg > truffle
comparison src/share/vm/runtime/thread.hpp @ 6872:7b5885dadbdc
8000617: It should be possible to allocate memory without the VM dying.
Reviewed-by: coleenp, kamg
author | nloodin |
---|---|
date | Wed, 17 Oct 2012 17:36:48 +0200 |
parents | fb19af007ffc |
children | c284cf4781f0 |
comparison
equal
deleted
inserted
replaced
6871:045cb62046a7 | 6872:7b5885dadbdc |
---|---|
108 protected: | 108 protected: |
109 // Support for forcing alignment of thread objects for biased locking | 109 // Support for forcing alignment of thread objects for biased locking |
110 void* _real_malloc_address; | 110 void* _real_malloc_address; |
111 public: | 111 public: |
112 void* operator new(size_t size) { return allocate(size, true); } | 112 void* operator new(size_t size) { return allocate(size, true); } |
113 void* operator new(size_t size, std::nothrow_t& nothrow_constant) { return allocate(size, false); } | 113 void* operator new(size_t size, const std::nothrow_t& nothrow_constant) { return allocate(size, false); } |
114 void operator delete(void* p); | 114 void operator delete(void* p); |
115 | 115 |
116 protected: | 116 protected: |
117 static void* allocate(size_t size, bool throw_excpt, MEMFLAGS flags = mtThread); | 117 static void* allocate(size_t size, bool throw_excpt, MEMFLAGS flags = mtThread); |
118 private: | 118 private: |