Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: test/cctest/test-api.cc

Issue 18068007: Add 4K more memory for the HugeConsStringOutOfMemory test case (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3766 matching lines...) Expand 10 before | Expand all | Expand 10 after
3777 } 3777 }
3778 3778
3779 3779
3780 TEST(HugeConsStringOutOfMemory) { 3780 TEST(HugeConsStringOutOfMemory) {
3781 // It's not possible to read a snapshot into a heap with different dimensions. 3781 // It's not possible to read a snapshot into a heap with different dimensions.
3782 if (i::Snapshot::IsEnabled()) return; 3782 if (i::Snapshot::IsEnabled()) return;
3783 // Set heap limits. 3783 // Set heap limits.
3784 static const int K = 1024; 3784 static const int K = 1024;
3785 v8::ResourceConstraints constraints; 3785 v8::ResourceConstraints constraints;
3786 constraints.set_max_young_space_size(256 * K); 3786 constraints.set_max_young_space_size(256 * K);
3787 constraints.set_max_old_space_size(3 * K * K); 3787 constraints.set_max_old_space_size(3 * K * K + 4 * K);
3788 v8::SetResourceConstraints(&constraints); 3788 v8::SetResourceConstraints(&constraints);
3789 3789
3790 // Execute a script that causes out of memory. 3790 // Execute a script that causes out of memory.
3791 v8::V8::IgnoreOutOfMemoryException(); 3791 v8::V8::IgnoreOutOfMemoryException();
3792 3792
3793 LocalContext context; 3793 LocalContext context;
3794 v8::HandleScope scope(context->GetIsolate()); 3794 v8::HandleScope scope(context->GetIsolate());
3795 3795
3796 // Build huge string. This should fail with out of memory exception. 3796 // Build huge string. This should fail with out of memory exception.
3797 Local<Value> result = CompileRun( 3797 Local<Value> result = CompileRun(
(...skipping 15803 matching lines...) Expand 10 before | Expand all | Expand 10 after
19601 i::Semaphore* sem_; 19601 i::Semaphore* sem_;
19602 volatile int sem_value_; 19602 volatile int sem_value_;
19603 }; 19603 };
19604 19604
19605 19605
19606 THREADED_TEST(SemaphoreInterruption) { 19606 THREADED_TEST(SemaphoreInterruption) {
19607 ThreadInterruptTest().RunTest(); 19607 ThreadInterruptTest().RunTest();
19608 } 19608 }
19609 19609
19610 #endif // WIN32 19610 #endif // WIN32
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698