Follow up on CL 122665.

We now do the two-step memory protection strategy (first protect the
from space with PROT_READ and later protect it with PROT_NONE) only if
the from space is a rosalloc space (excluding the more common bump
pointer space case). This strengthens the GC verification for the bump
pointer space case as we avoid the case where mutators run while the
from space is PROT_READ rather than PROT_NONE.

Add a command line flag to override the minimum interval for the
hspace compaction for OOM and set it to zero in the gcstress/gcverify
run-tests to run the hspace compaction more frequently in tests.

Fix some comments.

Bug: 18960494
Change-Id: I518b011e026f578e53c4ec269cfb82865b0fae68
diff --git a/test/run-test b/test/run-test
index aba4e05..d2b1ec9 100755
--- a/test/run-test
+++ b/test/run-test
@@ -281,7 +281,8 @@
 mkdir -p $tmp_dir
 
 if [ "$basic_verify" = "true" ]; then
-  run_args="${run_args} --runtime-option -Xgc:preverify --runtime-option -Xgc:postverify"
+  # Set HspaceCompactForOOMMinIntervalMs to zero to run hspace compaction for OOM more frequently in tests.
+  run_args="${run_args} --runtime-option -Xgc:preverify --runtime-option -Xgc:postverify --runtime-option -XX:HspaceCompactForOOMMinIntervalMs=0"
 fi
 if [ "$gc_verify" = "true" ]; then
   run_args="${run_args} --runtime-option -Xgc:preverify_rosalloc --runtime-option -Xgc:postverify_rosalloc"