OLD | NEW |
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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 } | 260 } |
261 | 261 |
262 | 262 |
263 MaybeObject* Heap::AllocateRawMap() { | 263 MaybeObject* Heap::AllocateRawMap() { |
264 #ifdef DEBUG | 264 #ifdef DEBUG |
265 isolate_->counters()->objs_since_last_full()->Increment(); | 265 isolate_->counters()->objs_since_last_full()->Increment(); |
266 isolate_->counters()->objs_since_last_young()->Increment(); | 266 isolate_->counters()->objs_since_last_young()->Increment(); |
267 #endif | 267 #endif |
268 MaybeObject* result = map_space_->AllocateRaw(Map::kSize); | 268 MaybeObject* result = map_space_->AllocateRaw(Map::kSize); |
269 if (result->IsFailure()) old_gen_exhausted_ = true; | 269 if (result->IsFailure()) old_gen_exhausted_ = true; |
270 #ifdef DEBUG | |
271 if (!result->IsFailure()) { | |
272 // Maps have their own alignment. | |
273 CHECK((reinterpret_cast<intptr_t>(result) & kMapAlignmentMask) == | |
274 static_cast<intptr_t>(kHeapObjectTag)); | |
275 } | |
276 #endif | |
277 return result; | 270 return result; |
278 } | 271 } |
279 | 272 |
280 | 273 |
281 MaybeObject* Heap::AllocateRawCell() { | 274 MaybeObject* Heap::AllocateRawCell() { |
282 #ifdef DEBUG | 275 #ifdef DEBUG |
283 isolate_->counters()->objs_since_last_full()->Increment(); | 276 isolate_->counters()->objs_since_last_full()->Increment(); |
284 isolate_->counters()->objs_since_last_young()->Increment(); | 277 isolate_->counters()->objs_since_last_young()->Increment(); |
285 #endif | 278 #endif |
286 MaybeObject* result = cell_space_->AllocateRaw(JSGlobalPropertyCell::kSize); | 279 MaybeObject* result = cell_space_->AllocateRaw(JSGlobalPropertyCell::kSize); |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 AssertNoAllocation::~AssertNoAllocation() { } | 801 AssertNoAllocation::~AssertNoAllocation() { } |
809 DisableAssertNoAllocation::DisableAssertNoAllocation() { } | 802 DisableAssertNoAllocation::DisableAssertNoAllocation() { } |
810 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } | 803 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } |
811 | 804 |
812 #endif | 805 #endif |
813 | 806 |
814 | 807 |
815 } } // namespace v8::internal | 808 } } // namespace v8::internal |
816 | 809 |
817 #endif // V8_HEAP_INL_H_ | 810 #endif // V8_HEAP_INL_H_ |
OLD | NEW |