comparison src/share/vm/memory/allocation.hpp @ 362:f8199438385b

Merge
author apetrusenko
date Wed, 17 Sep 2008 16:49:18 +0400
parents 37f87013dfd8
children c18cbe5936b8
comparison
equal deleted inserted replaced
316:5fa96a5a7e76 362:f8199438385b
336 address res = (address)resource_allocate_bytes(size); 336 address res = (address)resource_allocate_bytes(size);
337 // Set allocation type in the resource object 337 // Set allocation type in the resource object
338 DEBUG_ONLY(((ResourceObj *)res)->_allocation = RESOURCE_AREA;) 338 DEBUG_ONLY(((ResourceObj *)res)->_allocation = RESOURCE_AREA;)
339 return res; 339 return res;
340 } 340 }
341 void* operator new(size_t size, void* where, allocation_type type) {
342 void* res = where;
343 // Set allocation type in the resource object
344 DEBUG_ONLY(((ResourceObj *)res)->_allocation = type;)
345 return res;
346 }
341 void operator delete(void* p); 347 void operator delete(void* p);
342 }; 348 };
343 349
344 // One of the following macros must be used when allocating an array 350 // One of the following macros must be used when allocating an array
345 // or object to determine whether it should reside in the C heap on in 351 // or object to determine whether it should reside in the C heap on in