OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 | 214 |
215 size_t reserve_area_size = 1 * MB; | 215 size_t reserve_area_size = 1 * MB; |
216 size_t initial_commit_area_size, second_commit_area_size; | 216 size_t initial_commit_area_size, second_commit_area_size; |
217 | 217 |
218 for (int i = 0; i < 100; i++) { | 218 for (int i = 0; i < 100; i++) { |
219 initial_commit_area_size = Pseudorandom(); | 219 initial_commit_area_size = Pseudorandom(); |
220 second_commit_area_size = Pseudorandom(); | 220 second_commit_area_size = Pseudorandom(); |
221 | 221 |
222 // With CodeRange. | 222 // With CodeRange. |
223 CodeRange* code_range = new CodeRange(isolate); | 223 CodeRange* code_range = new CodeRange(isolate); |
224 const int code_range_size = 32 * MB; | 224 const size_t code_range_size = 32 * MB; |
225 if (!code_range->SetUp(code_range_size)) return; | 225 if (!code_range->SetUp(code_range_size)) return; |
226 | 226 |
227 VerifyMemoryChunk(isolate, | 227 VerifyMemoryChunk(isolate, |
228 heap, | 228 heap, |
229 code_range, | 229 code_range, |
230 reserve_area_size, | 230 reserve_area_size, |
231 initial_commit_area_size, | 231 initial_commit_area_size, |
232 second_commit_area_size, | 232 second_commit_area_size, |
233 EXECUTABLE); | 233 EXECUTABLE); |
234 | 234 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 CompileRun("/*empty*/"); | 418 CompileRun("/*empty*/"); |
419 for (int i = FIRST_PAGED_SPACE; i <= LAST_PAGED_SPACE; i++) { | 419 for (int i = FIRST_PAGED_SPACE; i <= LAST_PAGED_SPACE; i++) { |
420 // Debug code can be very large, so skip CODE_SPACE if we are generating it. | 420 // Debug code can be very large, so skip CODE_SPACE if we are generating it. |
421 if (i == CODE_SPACE && i::FLAG_debug_code) continue; | 421 if (i == CODE_SPACE && i::FLAG_debug_code) continue; |
422 CHECK_EQ(1, isolate->heap()->paged_space(i)->CountTotalPages()); | 422 CHECK_EQ(1, isolate->heap()->paged_space(i)->CountTotalPages()); |
423 } | 423 } |
424 | 424 |
425 // No large objects required to perform the above steps. | 425 // No large objects required to perform the above steps. |
426 CHECK(isolate->heap()->lo_space()->IsEmpty()); | 426 CHECK(isolate->heap()->lo_space()->IsEmpty()); |
427 } | 427 } |
OLD | NEW |