mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
6953477: Increase portability and flexibility of building Hotspot
A collection of portability improvements including shared code support for PPC, ARM platforms, software floating point, cross compilation support and improvements in error crash detail. Reviewed-by: phh, never, coleenp, dholmes
This commit is contained in:
parent
c45761e2a8
commit
b95c7e9523
113 changed files with 1669 additions and 559 deletions
|
@ -166,32 +166,40 @@ class ChunkPool {
|
|||
_medium_pool = new ChunkPool(Chunk::medium_size + Chunk::aligned_overhead_size());
|
||||
_small_pool = new ChunkPool(Chunk::init_size + Chunk::aligned_overhead_size());
|
||||
}
|
||||
|
||||
static void clean() {
|
||||
enum { BlocksToKeep = 5 };
|
||||
_small_pool->free_all_but(BlocksToKeep);
|
||||
_medium_pool->free_all_but(BlocksToKeep);
|
||||
_large_pool->free_all_but(BlocksToKeep);
|
||||
}
|
||||
};
|
||||
|
||||
ChunkPool* ChunkPool::_large_pool = NULL;
|
||||
ChunkPool* ChunkPool::_medium_pool = NULL;
|
||||
ChunkPool* ChunkPool::_small_pool = NULL;
|
||||
|
||||
|
||||
void chunkpool_init() {
|
||||
ChunkPool::initialize();
|
||||
}
|
||||
|
||||
void
|
||||
Chunk::clean_chunk_pool() {
|
||||
ChunkPool::clean();
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// ChunkPoolCleaner implementation
|
||||
//
|
||||
|
||||
class ChunkPoolCleaner : public PeriodicTask {
|
||||
enum { CleaningInterval = 5000, // cleaning interval in ms
|
||||
BlocksToKeep = 5 // # of extra blocks to keep
|
||||
};
|
||||
enum { CleaningInterval = 5000 }; // cleaning interval in ms
|
||||
|
||||
public:
|
||||
ChunkPoolCleaner() : PeriodicTask(CleaningInterval) {}
|
||||
void task() {
|
||||
ChunkPool::small_pool()->free_all_but(BlocksToKeep);
|
||||
ChunkPool::medium_pool()->free_all_but(BlocksToKeep);
|
||||
ChunkPool::large_pool()->free_all_but(BlocksToKeep);
|
||||
ChunkPool::clean();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue