Chromium Code Reviews| 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 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 587 | 587 |
| 588 | 588 |
| 589 void MemoryAllocator::Free(MemoryChunk* chunk) { | 589 void MemoryAllocator::Free(MemoryChunk* chunk) { |
| 590 LOG(isolate_, DeleteEvent("MemoryChunk", chunk)); | 590 LOG(isolate_, DeleteEvent("MemoryChunk", chunk)); |
| 591 if (chunk->owner() != NULL) { | 591 if (chunk->owner() != NULL) { |
| 592 ObjectSpace space = | 592 ObjectSpace space = |
| 593 static_cast<ObjectSpace>(1 << chunk->owner()->identity()); | 593 static_cast<ObjectSpace>(1 << chunk->owner()->identity()); |
| 594 PerformAllocationCallback(space, kAllocationActionFree, chunk->size()); | 594 PerformAllocationCallback(space, kAllocationActionFree, chunk->size()); |
| 595 } | 595 } |
| 596 | 596 |
| 597 isolate_->heap()->RememberUnmappedPage( | |
| 598 reinterpret_cast<Address>(chunk), chunk->IsEvacuationCandidate()); | |
|
Vyacheslav Egorov (Chromium)
2012/03/16 11:56:52
I think we clear evacuation candidate before we re
| |
| 599 | |
| 597 delete chunk->slots_buffer(); | 600 delete chunk->slots_buffer(); |
| 598 delete chunk->skip_list(); | 601 delete chunk->skip_list(); |
| 599 | 602 |
| 600 VirtualMemory* reservation = chunk->reserved_memory(); | 603 VirtualMemory* reservation = chunk->reserved_memory(); |
| 601 if (reservation->IsReserved()) { | 604 if (reservation->IsReserved()) { |
| 602 FreeMemory(reservation, chunk->executable()); | 605 FreeMemory(reservation, chunk->executable()); |
| 603 } else { | 606 } else { |
| 604 FreeMemory(chunk->address(), | 607 FreeMemory(chunk->address(), |
| 605 chunk->size(), | 608 chunk->size(), |
| 606 chunk->executable()); | 609 chunk->executable()); |
| (...skipping 2177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2784 object->ShortPrint(); | 2787 object->ShortPrint(); |
| 2785 PrintF("\n"); | 2788 PrintF("\n"); |
| 2786 } | 2789 } |
| 2787 printf(" --------------------------------------\n"); | 2790 printf(" --------------------------------------\n"); |
| 2788 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 2791 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 2789 } | 2792 } |
| 2790 | 2793 |
| 2791 #endif // DEBUG | 2794 #endif // DEBUG |
| 2792 | 2795 |
| 2793 } } // namespace v8::internal | 2796 } } // namespace v8::internal |
| OLD | NEW |