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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 186 |
187 memory_chunk->CommitArea(second_commit_area_size); | 187 memory_chunk->CommitArea(second_commit_area_size); |
188 CHECK(area_start == memory_chunk->area_start()); | 188 CHECK(area_start == memory_chunk->area_start()); |
189 CHECK(memory_chunk->area_start() < | 189 CHECK(memory_chunk->area_start() < |
190 memory_chunk->address() + memory_chunk->size()); | 190 memory_chunk->address() + memory_chunk->size()); |
191 CHECK(memory_chunk->area_end() <= | 191 CHECK(memory_chunk->area_end() <= |
192 memory_chunk->address() + memory_chunk->size()); | 192 memory_chunk->address() + memory_chunk->size()); |
193 CHECK(static_cast<size_t>(memory_chunk->area_size()) == | 193 CHECK(static_cast<size_t>(memory_chunk->area_size()) == |
194 second_commit_area_size); | 194 second_commit_area_size); |
195 | 195 |
196 memory_allocator->Free(memory_chunk); | 196 memory_allocator->Free<MemoryAllocator::kFull>(memory_chunk); |
197 } | 197 } |
198 memory_allocator->TearDown(); | 198 memory_allocator->TearDown(); |
199 delete memory_allocator; | 199 delete memory_allocator; |
200 } | 200 } |
201 | 201 |
202 | 202 |
203 TEST(Regress3540) { | 203 TEST(Regress3540) { |
204 Isolate* isolate = CcTest::i_isolate(); | 204 Isolate* isolate = CcTest::i_isolate(); |
205 Heap* heap = isolate->heap(); | 205 Heap* heap = isolate->heap(); |
206 const int pageSize = Page::kPageSize; | 206 const int pageSize = Page::kPageSize; |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 new_space->RemoveAllocationObserver(&observer2); | 673 new_space->RemoveAllocationObserver(&observer2); |
674 | 674 |
675 CHECK_EQ(observer1.count(), 32); | 675 CHECK_EQ(observer1.count(), 32); |
676 CHECK_EQ(observer2.count(), 28); | 676 CHECK_EQ(observer2.count(), 28); |
677 } | 677 } |
678 isolate->Dispose(); | 678 isolate->Dispose(); |
679 } | 679 } |
680 | 680 |
681 } // namespace internal | 681 } // namespace internal |
682 } // namespace v8 | 682 } // namespace v8 |
OLD | NEW |