diff options
author | Carl Shapiro <cshapiro@google.com> | 2011-03-30 19:35:34 -0700 |
---|---|---|
committer | Carl Shapiro <cshapiro@google.com> | 2011-03-30 19:53:34 -0700 |
commit | ce87bfed41bbe4248b2770fb1a90f34b2518f6fa (patch) | |
tree | 8a2ca573187d322f7202df68d36a1101294f5ee5 /vm/Init.c | |
parent | 6920d2c5b83f8ff0cdc8f33770cd658969dbd262 (diff) | |
download | android_dalvik-ce87bfed41bbe4248b2770fb1a90f34b2518f6fa.tar.gz android_dalvik-ce87bfed41bbe4248b2770fb1a90f34b2518f6fa.tar.bz2 android_dalvik-ce87bfed41bbe4248b2770fb1a90f34b2518f6fa.zip |
Delegate the queuing of cleared references to managed code.
Previously, the garbage collector would pass each cleared reference to
the heap worker thread for queuing. The heap worker thread would then
perform a callback into managed code for each cleared reference which
assigned the reference to its reference queue.
With this change, the garbage collector instead links together all of
the cleared references and calls back into managed code exactly once
to hand off the references for processing. This change makes the heap
worker thread and its data structures obsolete.
Change-Id: I28e02638f0877a7fd2ac96b9c3f5597a38541ebb
Diffstat (limited to 'vm/Init.c')
-rw-r--r-- | vm/Init.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1314,6 +1314,9 @@ int dvmStartup(int argc, const char* const argv[], bool ignoreUnrecognized, if (!dvmDebuggerStartup()) goto fail; + if (!dvmGcStartupClasses()) + goto fail; + /* * Init for either zygote mode or non-zygote mode. The key difference * is that we don't start any additional threads in Zygote mode. |