src/share/vm/memory/allocation.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/memory/allocation.cpp Mon Aug 2 14:26:19 2010
--- new/src/share/vm/memory/allocation.cpp Mon Aug 2 14:26:19 2010
*** 41,59 ****
--- 41,59 ----
void* ResourceObj::operator new(size_t size, allocation_type type) {
address res;
switch (type) {
case C_HEAP:
res = (address)AllocateHeap(size, "C_Heap: ResourceOBJ");
+ DEBUG_ONLY(set_allocation_type(res, C_HEAP);)
break;
case RESOURCE_AREA:
+ // Will set allocation type in the resource object.
res = (address)operator new(size);
break;
default:
ShouldNotReachHere();
}
// Set allocation type in the resource object for assertion checks.
DEBUG_ONLY(((ResourceObj *)res)->_allocation = type;)
return res;
}
void ResourceObj::operator delete(void* p) {
assert(((ResourceObj *)p)->allocated_on_C_heap(),
src/share/vm/memory/allocation.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File