mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
7036747: 7017009 reappeared, problem with ElfStringTable
Created new "new" operator for CHeapObj that allows malloc to fail without causing fatal error. Also replaced "HeapAllocate" with "os::malloc" in decoder code to allow decoder to handle low memory scenario. Reviewed-by: coleenp, dholmes
This commit is contained in:
parent
3c4d3002f2
commit
865413485d
4 changed files with 20 additions and 7 deletions
|
@ -34,6 +34,8 @@
|
|||
#include "opto/c2_globals.hpp"
|
||||
#endif
|
||||
|
||||
#include <new>
|
||||
|
||||
#define ARENA_ALIGN_M1 (((size_t)(ARENA_AMALLOC_ALIGNMENT)) - 1)
|
||||
#define ARENA_ALIGN_MASK (~((size_t)ARENA_ALIGN_M1))
|
||||
#define ARENA_ALIGN(x) ((((size_t)(x)) + ARENA_ALIGN_M1) & ARENA_ALIGN_MASK)
|
||||
|
@ -99,6 +101,7 @@ class AllocatedObj {
|
|||
class CHeapObj ALLOCATION_SUPER_CLASS_SPEC {
|
||||
public:
|
||||
void* operator new(size_t size);
|
||||
void* operator new (size_t size, const std::nothrow_t& nothrow_constant);
|
||||
void operator delete(void* p);
|
||||
void* new_array(size_t size);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue