hotspot/src/share/vm/memory/allocation.hpp

Print this page
rev 611 : Merge

*** 339,348 **** --- 339,354 ---- address res = (address)resource_allocate_bytes(size); // Set allocation type in the resource object DEBUG_ONLY(((ResourceObj *)res)->_allocation = RESOURCE_AREA;) return res; } + void* operator new(size_t size, void* where, allocation_type type) { + void* res = where; + // Set allocation type in the resource object + DEBUG_ONLY(((ResourceObj *)res)->_allocation = type;) + return res; + } void operator delete(void* p); }; // One of the following macros must be used when allocating an array // or object to determine whether it should reside in the C heap on in