Chromium Code Reviews| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 #else | 88 #else |
| 89 #define FILL_ZERO_IF_PRODUCTION(address, size) memset((address), 0, (size)) | 89 #define FILL_ZERO_IF_PRODUCTION(address, size) memset((address), 0, (size)) |
| 90 #define FILL_ZERO_IF_NOT_PRODUCTION(address, size) do { } while (false) | 90 #define FILL_ZERO_IF_NOT_PRODUCTION(address, size) do { } while (false) |
| 91 #endif | 91 #endif |
| 92 | 92 |
| 93 class CallbackStack; | 93 class CallbackStack; |
| 94 class FreePagePool; | 94 class FreePagePool; |
| 95 class NormalPageHeap; | 95 class NormalPageHeap; |
| 96 class OrphanedPagePool; | 96 class OrphanedPagePool; |
| 97 class PageMemory; | 97 class PageMemory; |
| 98 class WebProcessMemoryDump; | |
|
Primiano Tucci (use gerrit)
2015/05/22 19:45:57
I think you don't need this anymore.
ssid
2015/05/26 11:08:43
Done.
| |
| 98 | 99 |
| 99 #if ENABLE(GC_PROFILING) | 100 #if ENABLE(GC_PROFILING) |
| 100 class TracedValue; | 101 class TracedValue; |
| 101 #endif | 102 #endif |
| 102 | 103 |
| 103 // HeapObjectHeader is 4 byte (32 bit) that has the following layout: | 104 // HeapObjectHeader is 4 byte (32 bit) that has the following layout: |
| 104 // | 105 // |
| 105 // | gcInfoIndex (14 bit) | DOM mark bit (1 bit) | size (14 bit) | dead bit (1 b it) | freed bit (1 bit) | mark bit (1 bit) | | 106 // | gcInfoIndex (14 bit) | DOM mark bit (1 bit) | size (14 bit) | dead bit (1 b it) | freed bit (1 bit) | mark bit (1 bit) | |
| 106 // | 107 // |
| 107 // - For non-large objects, 14 bit is enough for |size| because the blink | 108 // - For non-large objects, 14 bit is enough for |size| because the blink |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 679 // | 680 // |
| 680 // BaseHeap is a parent class of NormalPageHeap and LargeObjectHeap. | 681 // BaseHeap is a parent class of NormalPageHeap and LargeObjectHeap. |
| 681 // NormalPageHeap represents a heap that contains NormalPages | 682 // NormalPageHeap represents a heap that contains NormalPages |
| 682 // and LargeObjectHeap represents a heap that contains LargeObjectPages. | 683 // and LargeObjectHeap represents a heap that contains LargeObjectPages. |
| 683 class PLATFORM_EXPORT BaseHeap { | 684 class PLATFORM_EXPORT BaseHeap { |
| 684 public: | 685 public: |
| 685 BaseHeap(ThreadState*, int); | 686 BaseHeap(ThreadState*, int); |
| 686 virtual ~BaseHeap(); | 687 virtual ~BaseHeap(); |
| 687 void cleanupPages(); | 688 void cleanupPages(); |
| 688 | 689 |
| 690 void dumpMemory(const String& allocatorBaseName); | |
| 689 #if ENABLE(ASSERT) || ENABLE(GC_PROFILING) | 691 #if ENABLE(ASSERT) || ENABLE(GC_PROFILING) |
| 690 BasePage* findPageFromAddress(Address); | 692 BasePage* findPageFromAddress(Address); |
| 691 #endif | 693 #endif |
| 692 #if ENABLE(GC_PROFILING) | 694 #if ENABLE(GC_PROFILING) |
| 693 void snapshot(TracedValue*, ThreadState::SnapshotInfo*); | 695 void snapshot(TracedValue*, ThreadState::SnapshotInfo*); |
| 694 virtual void snapshotFreeList(TracedValue&) { }; | 696 virtual void snapshotFreeList(TracedValue&) { }; |
| 695 | 697 |
| 696 void countMarkedObjects(ClassAgeCountsMap&) const; | 698 void countMarkedObjects(ClassAgeCountsMap&) const; |
| 697 void countObjectsToSweep(ClassAgeCountsMap&) const; | 699 void countObjectsToSweep(ClassAgeCountsMap&) const; |
| 698 void incrementMarkedObjectsAge(); | 700 void incrementMarkedObjectsAge(); |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1273 size_t copySize = previousHeader->payloadSize(); | 1275 size_t copySize = previousHeader->payloadSize(); |
| 1274 if (copySize > size) | 1276 if (copySize > size) |
| 1275 copySize = size; | 1277 copySize = size; |
| 1276 memcpy(address, previous, copySize); | 1278 memcpy(address, previous, copySize); |
| 1277 return address; | 1279 return address; |
| 1278 } | 1280 } |
| 1279 | 1281 |
| 1280 } // namespace blink | 1282 } // namespace blink |
| 1281 | 1283 |
| 1282 #endif // Heap_h | 1284 #endif // Heap_h |
| OLD | NEW |