| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 // | 676 // |
| 677 // BaseHeap is a parent class of NormalPageHeap and LargeObjectHeap. | 677 // BaseHeap is a parent class of NormalPageHeap and LargeObjectHeap. |
| 678 // NormalPageHeap represents a heap that contains NormalPages | 678 // NormalPageHeap represents a heap that contains NormalPages |
| 679 // and LargeObjectHeap represents a heap that contains LargeObjectPages. | 679 // and LargeObjectHeap represents a heap that contains LargeObjectPages. |
| 680 class PLATFORM_EXPORT BaseHeap { | 680 class PLATFORM_EXPORT BaseHeap { |
| 681 public: | 681 public: |
| 682 BaseHeap(ThreadState*, int); | 682 BaseHeap(ThreadState*, int); |
| 683 virtual ~BaseHeap(); | 683 virtual ~BaseHeap(); |
| 684 void cleanupPages(); | 684 void cleanupPages(); |
| 685 | 685 |
| 686 void takeSnapshot(const String& dumpBaseName); |
| 686 #if ENABLE(ASSERT) || ENABLE(GC_PROFILING) | 687 #if ENABLE(ASSERT) || ENABLE(GC_PROFILING) |
| 687 BasePage* findPageFromAddress(Address); | 688 BasePage* findPageFromAddress(Address); |
| 688 #endif | 689 #endif |
| 689 #if ENABLE(GC_PROFILING) | 690 #if ENABLE(GC_PROFILING) |
| 690 void snapshot(TracedValue*, ThreadState::SnapshotInfo*); | 691 void snapshot(TracedValue*, ThreadState::SnapshotInfo*); |
| 691 virtual void snapshotFreeList(TracedValue&) { }; | 692 virtual void snapshotFreeList(TracedValue&) { }; |
| 692 | 693 |
| 693 void countMarkedObjects(ClassAgeCountsMap&) const; | 694 void countMarkedObjects(ClassAgeCountsMap&) const; |
| 694 void countObjectsToSweep(ClassAgeCountsMap&) const; | 695 void countObjectsToSweep(ClassAgeCountsMap&) const; |
| 695 void incrementMarkedObjectsAge(); | 696 void incrementMarkedObjectsAge(); |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1382 size_t copySize = previousHeader->payloadSize(); | 1383 size_t copySize = previousHeader->payloadSize(); |
| 1383 if (copySize > size) | 1384 if (copySize > size) |
| 1384 copySize = size; | 1385 copySize = size; |
| 1385 memcpy(address, previous, copySize); | 1386 memcpy(address, previous, copySize); |
| 1386 return address; | 1387 return address; |
| 1387 } | 1388 } |
| 1388 | 1389 |
| 1389 } // namespace blink | 1390 } // namespace blink |
| 1390 | 1391 |
| 1391 #endif // Heap_h | 1392 #endif // Heap_h |
| OLD | NEW |