Mercurial > hg > truffle
comparison src/share/vm/memory/allocation.cpp @ 14521:29ccc4cbabca
Merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 12 Mar 2014 13:30:08 +0100 |
parents | abec000618bf |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
14520:f84115370178 | 14521:29ccc4cbabca |
---|---|
43 # include "os_solaris.inline.hpp" | 43 # include "os_solaris.inline.hpp" |
44 #endif | 44 #endif |
45 #ifdef TARGET_OS_FAMILY_windows | 45 #ifdef TARGET_OS_FAMILY_windows |
46 # include "os_windows.inline.hpp" | 46 # include "os_windows.inline.hpp" |
47 #endif | 47 #endif |
48 #ifdef TARGET_OS_FAMILY_aix | |
49 # include "os_aix.inline.hpp" | |
50 #endif | |
48 #ifdef TARGET_OS_FAMILY_bsd | 51 #ifdef TARGET_OS_FAMILY_bsd |
49 # include "os_bsd.inline.hpp" | 52 # include "os_bsd.inline.hpp" |
50 #endif | 53 #endif |
51 | 54 |
52 void* StackObj::operator new(size_t size) throw() { ShouldNotCallThis(); return 0; } | 55 void* StackObj::operator new(size_t size) throw() { ShouldNotCallThis(); return 0; } |
69 | 72 |
70 bool MetaspaceObj::is_shared() const { | 73 bool MetaspaceObj::is_shared() const { |
71 return MetaspaceShared::is_in_shared_space(this); | 74 return MetaspaceShared::is_in_shared_space(this); |
72 } | 75 } |
73 | 76 |
74 | |
75 bool MetaspaceObj::is_metaspace_object() const { | 77 bool MetaspaceObj::is_metaspace_object() const { |
76 return Metaspace::contains((void*)this); | 78 return ClassLoaderDataGraph::contains((void*)this); |
77 } | 79 } |
78 | 80 |
79 void MetaspaceObj::print_address_on(outputStream* st) const { | 81 void MetaspaceObj::print_address_on(outputStream* st) const { |
80 st->print(" {"INTPTR_FORMAT"}", this); | 82 st->print(" {"INTPTR_FORMAT"}", this); |
81 } | 83 } |
138 | 140 |
139 #ifdef ASSERT | 141 #ifdef ASSERT |
140 void ResourceObj::set_allocation_type(address res, allocation_type type) { | 142 void ResourceObj::set_allocation_type(address res, allocation_type type) { |
141 // Set allocation type in the resource object | 143 // Set allocation type in the resource object |
142 uintptr_t allocation = (uintptr_t)res; | 144 uintptr_t allocation = (uintptr_t)res; |
143 assert((allocation & allocation_mask) == 0, "address should be aligned to 4 bytes at least"); | 145 assert((allocation & allocation_mask) == 0, err_msg("address should be aligned to 4 bytes at least: " PTR_FORMAT, res)); |
144 assert(type <= allocation_mask, "incorrect allocation type"); | 146 assert(type <= allocation_mask, "incorrect allocation type"); |
145 ResourceObj* resobj = (ResourceObj *)res; | 147 ResourceObj* resobj = (ResourceObj *)res; |
146 resobj->_allocation_t[0] = ~(allocation + type); | 148 resobj->_allocation_t[0] = ~(allocation + type); |
147 if (type != STACK_OR_EMBEDDED) { | 149 if (type != STACK_OR_EMBEDDED) { |
148 // Called from operator new() and CollectionSetChooser(), | 150 // Called from operator new() and CollectionSetChooser(), |