| 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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 object_size, | 703 object_size, |
| 704 executable, | 704 executable, |
| 705 owner); | 705 owner); |
| 706 if (chunk == NULL) return NULL; | 706 if (chunk == NULL) return NULL; |
| 707 return LargePage::Initialize(isolate_->heap(), chunk); | 707 return LargePage::Initialize(isolate_->heap(), chunk); |
| 708 } | 708 } |
| 709 | 709 |
| 710 | 710 |
| 711 void MemoryAllocator::Free(MemoryChunk* chunk) { | 711 void MemoryAllocator::Free(MemoryChunk* chunk) { |
| 712 LOG(isolate_, DeleteEvent("MemoryChunk", chunk)); | 712 LOG(isolate_, DeleteEvent("MemoryChunk", chunk)); |
| 713 if (chunk->owner() != NULL) { | 713 if (chunk->has_owner()) { |
| 714 ObjectSpace space = | 714 ObjectSpace space = |
| 715 static_cast<ObjectSpace>(1 << chunk->owner()->identity()); | 715 static_cast<ObjectSpace>(1 << chunk->owner()->identity()); |
| 716 PerformAllocationCallback(space, kAllocationActionFree, chunk->size()); | 716 PerformAllocationCallback(space, kAllocationActionFree, chunk->size()); |
| 717 } | 717 } |
| 718 | 718 |
| 719 isolate_->heap()->RememberUnmappedPage( | 719 isolate_->heap()->RememberUnmappedPage( |
| 720 reinterpret_cast<Address>(chunk), chunk->IsEvacuationCandidate()); | 720 reinterpret_cast<Address>(chunk), chunk->IsEvacuationCandidate()); |
| 721 | 721 |
| 722 delete chunk->slots_buffer(); | 722 delete chunk->slots_buffer(); |
| 723 delete chunk->skip_list(); | 723 delete chunk->skip_list(); |
| (...skipping 2373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3097 object->ShortPrint(); | 3097 object->ShortPrint(); |
| 3098 PrintF("\n"); | 3098 PrintF("\n"); |
| 3099 } | 3099 } |
| 3100 printf(" --------------------------------------\n"); | 3100 printf(" --------------------------------------\n"); |
| 3101 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3101 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 3102 } | 3102 } |
| 3103 | 3103 |
| 3104 #endif // DEBUG | 3104 #endif // DEBUG |
| 3105 | 3105 |
| 3106 } } // namespace v8::internal | 3106 } } // namespace v8::internal |
| OLD | NEW |