| 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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 // | 671 // |
| 672 // BaseHeap is a parent class of NormalPageHeap and LargeObjectHeap. | 672 // BaseHeap is a parent class of NormalPageHeap and LargeObjectHeap. |
| 673 // NormalPageHeap represents a heap that contains NormalPages | 673 // NormalPageHeap represents a heap that contains NormalPages |
| 674 // and LargeObjectHeap represents a heap that contains LargeObjectPages. | 674 // and LargeObjectHeap represents a heap that contains LargeObjectPages. |
| 675 class PLATFORM_EXPORT BaseHeap { | 675 class PLATFORM_EXPORT BaseHeap { |
| 676 public: | 676 public: |
| 677 BaseHeap(ThreadState*, int); | 677 BaseHeap(ThreadState*, int); |
| 678 virtual ~BaseHeap(); | 678 virtual ~BaseHeap(); |
| 679 void cleanupPages(); | 679 void cleanupPages(); |
| 680 | 680 |
| 681 void takeSnapshot(const String& dumpBaseName); |
| 681 #if ENABLE(ASSERT) || ENABLE(GC_PROFILING) | 682 #if ENABLE(ASSERT) || ENABLE(GC_PROFILING) |
| 682 BasePage* findPageFromAddress(Address); | 683 BasePage* findPageFromAddress(Address); |
| 683 #endif | 684 #endif |
| 684 #if ENABLE(GC_PROFILING) | 685 #if ENABLE(GC_PROFILING) |
| 685 void snapshot(TracedValue*, ThreadState::SnapshotInfo*); | 686 void snapshot(TracedValue*, ThreadState::SnapshotInfo*); |
| 686 virtual void snapshotFreeList(TracedValue&) { }; | 687 virtual void snapshotFreeList(TracedValue&) { }; |
| 687 | 688 |
| 688 void countMarkedObjects(ClassAgeCountsMap&) const; | 689 void countMarkedObjects(ClassAgeCountsMap&) const; |
| 689 void countObjectsToSweep(ClassAgeCountsMap&) const; | 690 void countObjectsToSweep(ClassAgeCountsMap&) const; |
| 690 void incrementMarkedObjectsAge(); | 691 void incrementMarkedObjectsAge(); |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1295 size_t copySize = previousHeader->payloadSize(); | 1296 size_t copySize = previousHeader->payloadSize(); |
| 1296 if (copySize > size) | 1297 if (copySize > size) |
| 1297 copySize = size; | 1298 copySize = size; |
| 1298 memcpy(address, previous, copySize); | 1299 memcpy(address, previous, copySize); |
| 1299 return address; | 1300 return address; |
| 1300 } | 1301 } |
| 1301 | 1302 |
| 1302 } // namespace blink | 1303 } // namespace blink |
| 1303 | 1304 |
| 1304 #endif // Heap_h | 1305 #endif // Heap_h |
| OLD | NEW |