| 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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 // | 679 // |
| 680 // BaseHeap is a parent class of NormalPageHeap and LargeObjectHeap. | 680 // BaseHeap is a parent class of NormalPageHeap and LargeObjectHeap. |
| 681 // NormalPageHeap represents a heap that contains NormalPages | 681 // NormalPageHeap represents a heap that contains NormalPages |
| 682 // and LargeObjectHeap represents a heap that contains LargeObjectPages. | 682 // and LargeObjectHeap represents a heap that contains LargeObjectPages. |
| 683 class PLATFORM_EXPORT BaseHeap { | 683 class PLATFORM_EXPORT BaseHeap { |
| 684 public: | 684 public: |
| 685 BaseHeap(ThreadState*, int); | 685 BaseHeap(ThreadState*, int); |
| 686 virtual ~BaseHeap(); | 686 virtual ~BaseHeap(); |
| 687 void cleanupPages(); | 687 void cleanupPages(); |
| 688 | 688 |
| 689 void dumpMemory(const String& allocatorBaseName); |
| 689 #if ENABLE(ASSERT) || ENABLE(GC_PROFILING) | 690 #if ENABLE(ASSERT) || ENABLE(GC_PROFILING) |
| 690 BasePage* findPageFromAddress(Address); | 691 BasePage* findPageFromAddress(Address); |
| 691 #endif | 692 #endif |
| 692 #if ENABLE(GC_PROFILING) | 693 #if ENABLE(GC_PROFILING) |
| 693 void snapshot(TracedValue*, ThreadState::SnapshotInfo*); | 694 void snapshot(TracedValue*, ThreadState::SnapshotInfo*); |
| 694 virtual void snapshotFreeList(TracedValue&) { }; | 695 virtual void snapshotFreeList(TracedValue&) { }; |
| 695 | 696 |
| 696 void countMarkedObjects(ClassAgeCountsMap&) const; | 697 void countMarkedObjects(ClassAgeCountsMap&) const; |
| 697 void countObjectsToSweep(ClassAgeCountsMap&) const; | 698 void countObjectsToSweep(ClassAgeCountsMap&) const; |
| 698 void incrementMarkedObjectsAge(); | 699 void incrementMarkedObjectsAge(); |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1273 size_t copySize = previousHeader->payloadSize(); | 1274 size_t copySize = previousHeader->payloadSize(); |
| 1274 if (copySize > size) | 1275 if (copySize > size) |
| 1275 copySize = size; | 1276 copySize = size; |
| 1276 memcpy(address, previous, copySize); | 1277 memcpy(address, previous, copySize); |
| 1277 return address; | 1278 return address; |
| 1278 } | 1279 } |
| 1279 | 1280 |
| 1280 } // namespace blink | 1281 } // namespace blink |
| 1281 | 1282 |
| 1282 #endif // Heap_h | 1283 #endif // Heap_h |
| OLD | NEW |