The OutOfMemory and OutOfMemoryNested tests set a heap limit that was too low.
authorerik.corry@gmail.com <erik.corry@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 17 Sep 2008 10:58:45 +0000 (10:58 +0000)
committererik.corry@gmail.com <erik.corry@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 17 Sep 2008 10:58:45 +0000 (10:58 +0000)
A change in the way heap was allocated meant that the initial heap size was
sometimes not higher than the limit, which mean that the limit started having
and effect and prevented V8 from booting up.

Fixes http://code.google.com/p/v8/issues/detail?id=25
Review URL: http://codereview.chromium.org/2924

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

test/cctest/test-api.cc

index ce6ac84..800cc8b 100644 (file)
@@ -1427,14 +1427,14 @@ static const char* js_code_causing_out_of_memory =
 
 // These tests run for a long time and prevent us from running tests
 // that come after them so they cannot run in parallel.
-DISABLED_TEST(OutOfMemory) {
+TEST(OutOfMemory) {
   // It's not possible to read a snapshot into a heap with different dimensions.
   if (v8::internal::Snapshot::IsEnabled()) return;
   // Set heap limits.
   static const int K = 1024;
   v8::ResourceConstraints constraints;
   constraints.set_max_young_space_size(256 * K);
-  constraints.set_max_old_space_size(2 * K * K);
+  constraints.set_max_old_space_size(4 * K * K);
   v8::SetResourceConstraints(&constraints);
 
   // Execute a script that causes out of memory.
@@ -1468,14 +1468,14 @@ v8::Handle<Value> ProvokeOutOfMemory(const v8::Arguments& args) {
 }
 
 
-DISABLED_TEST(OutOfMemoryNested) {
+TEST(OutOfMemoryNested) {
   // It's not possible to read a snapshot into a heap with different dimensions.
   if (v8::internal::Snapshot::IsEnabled()) return;
   // Set heap limits.
   static const int K = 1024;
   v8::ResourceConstraints constraints;
   constraints.set_max_young_space_size(256 * K);
-  constraints.set_max_old_space_size(2 * K * K);
+  constraints.set_max_old_space_size(4 * K * K);
   v8::SetResourceConstraints(&constraints);
 
   v8::HandleScope scope;