Commit 5312fc05 authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

The OutOfMemory and OutOfMemoryNested tests set a heap limit that was too low.

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
parent 05597193
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment