Mercurial > hg > truffle
comparison src/share/vm/memory/allocation.hpp @ 342:37f87013dfd8
6711316: Open source the Garbage-First garbage collector
Summary: First mercurial integration of the code for the Garbage-First garbage collector.
Reviewed-by: apetrusenko, iveresov, jmasa, sgoldman, tonyp, ysr
author | ysr |
---|---|
date | Thu, 05 Jun 2008 15:57:56 -0700 |
parents | a61af66fc99e |
children | c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
189:0b27f3512f9e | 342:37f87013dfd8 |
---|---|
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 |