The ParallelScavenge collector uses GCTasks to partition work amoung various
worker threads. GCTasks are resource objects, which are not explicitly
released.
Typical use allocates GCTasks inline, like this:
q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::object_synchronizer));
q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::flat_profiler));
q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::management));
q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::system_dictionary));
q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::jvmti));
However, there are some cases where we create tasks by calling out
to another ojbect:
// We scan the thread roots in parallel
Threads::create_thread_roots_tasks(q);
It is possible that the methods invoked might either contain or in
the future contain a ResourceMark. This would be a bad thing :-).
I believe we should add a NoResourceMarkVerifier object before creating
the various task objects in the vm thread, to make sure that we catch
any problems before they happen.
The meaty part of this bug is that at first inspection, I could not
find a NoResourceMarkVerifier class, one may need to be written.
###@###.### 2004-12-09 21:17:51 GMT