diff options
| author | Carl Shapiro <cshapiro@google.com> | 2011-03-21 13:35:24 -0700 |
|---|---|---|
| committer | Carl Shapiro <cshapiro@google.com> | 2011-03-21 13:35:24 -0700 |
| commit | 3475f9cdb47a6d6f8ad2ce49bbc3af46bca92f09 (patch) | |
| tree | 32bccadbd08a353a4650a6451218b0c854ec6fc2 /vm/Thread.c | |
| parent | 14b63ca9f3ba5b58c6f8ad703c7a9c68028aa230 (diff) | |
| download | android_dalvik-3475f9cdb47a6d6f8ad2ce49bbc3af46bca92f09.tar.gz android_dalvik-3475f9cdb47a6d6f8ad2ce49bbc3af46bca92f09.tar.bz2 android_dalvik-3475f9cdb47a6d6f8ad2ce49bbc3af46bca92f09.zip | |
Move finalization out of the VM.
This change introduces a new reference class whose referent
points to instances requiring finalization. This makes the
finalization of objects possible using a reference queue and
a dedicated thread which removes objects from the queue.
Change-Id: I0ff6dd272f00ca08c6ed3aa667bf766a039a944e
Diffstat (limited to 'vm/Thread.c')
| -rw-r--r-- | vm/Thread.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/vm/Thread.c b/vm/Thread.c index eb026fde3..33d659941 100644 --- a/vm/Thread.c +++ b/vm/Thread.c @@ -1311,23 +1311,6 @@ bool dvmCreateInterpThread(Object* threadObj, int reqStackSize) assert(threadObj != NULL); - if(gDvm.zygote) { - // Allow the sampling profiler thread. We shut it down before forking. - StringObject* nameStr = (StringObject*) dvmGetFieldObject(threadObj, - gDvm.offJavaLangThread_name); - char* threadName = dvmCreateCstrFromString(nameStr); - bool profilerThread = strcmp(threadName, "SamplingProfiler") == 0; - if (!profilerThread) { - dvmThrowExceptionFmt(gDvm.exIllegalStateException, - "No new threads in -Xzygote mode. " - "Found thread named '%s'", threadName); - - free(threadName); - goto fail; - } - free(threadName); - } - self = dvmThreadSelf(); if (reqStackSize == 0) stackSize = gDvm.stackSize; |
