projects
/
cacao.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ff42fd
)
* tests/gc/ThreadStress.java: Added stress test for threads.
author
michi
<none@none>
Thu, 29 Mar 2007 16:44:06 +0000
(16:44 +0000)
committer
michi
<none@none>
Thu, 29 Mar 2007 16:44:06 +0000
(16:44 +0000)
--HG--
branch : exact-gc
tests/gc/ThreadStress.java
[new file with mode: 0644]
patch
|
blob
diff --git a/tests/gc/ThreadStress.java
b/tests/gc/ThreadStress.java
new file mode 100644
(file)
index 0000000..
c88de53
--- /dev/null
+++ b/
tests/gc/ThreadStress.java
@@ -0,0
+1,21
@@
+public class ThreadStress extends Thread {
+ public static final int N=10;
+
+ public void run() {
+ while (true) {
+ System.gc();
+ }
+ }
+
+ public static void main(String args[]) {
+ ThreadStress t = null;
+
+ System.out.println("Creating and starting threads ...");
+ for (int i=0; i<N; i++) {
+ t = new ThreadStress();
+ t.start();
+ }
+
+ System.out.println("Finished.");
+ }
+}