< prev index next > src/hotspot/share/gc/shared/workgroup.cpp
Print this page
// The current implementation will exit if the allocation
// of any worker fails.
void AbstractWorkGang::initialize_workers() {
log_develop_trace(gc, workgang)("Constructing work gang %s with %u threads", name(), total_workers());
_workers = NEW_C_HEAP_ARRAY(AbstractGangWorker*, total_workers(), mtInternal);
- if (_workers == NULL) {
- vm_exit_out_of_memory(0, OOM_MALLOC_ERROR, "Cannot create GangWorker array.");
- }
-
add_workers(true);
}
AbstractGangWorker* AbstractWorkGang::install_worker(uint worker_id) {
// SubTasksDone functions.
SubTasksDone::SubTasksDone(uint n) :
_tasks(NULL), _n_tasks(n), _threads_completed(0) {
_tasks = NEW_C_HEAP_ARRAY(uint, n, mtInternal);
- guarantee(_tasks != NULL, "alloc failure");
clear();
}
bool SubTasksDone::valid() {
return _tasks != NULL;
< prev index next >