| 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 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1154 | 1154 |
| 1155 largeObject->link(&m_firstPage); | 1155 largeObject->link(&m_firstPage); |
| 1156 | 1156 |
| 1157 Heap::increaseAllocatedSpace(largeObject->size()); | 1157 Heap::increaseAllocatedSpace(largeObject->size()); |
| 1158 Heap::increaseAllocatedObjectSize(largeObject->size()); | 1158 Heap::increaseAllocatedObjectSize(largeObject->size()); |
| 1159 return result; | 1159 return result; |
| 1160 } | 1160 } |
| 1161 | 1161 |
| 1162 void LargeObjectHeap::freeLargeObjectPage(LargeObjectPage* object) | 1162 void LargeObjectHeap::freeLargeObjectPage(LargeObjectPage* object) |
| 1163 { | 1163 { |
| 1164 ASAN_UNPOISON_MEMORY_REGION(object->payload(), object->payloadSize()); |
| 1164 object->heapObjectHeader()->finalize(object->payload(), object->payloadSize(
)); | 1165 object->heapObjectHeader()->finalize(object->payload(), object->payloadSize(
)); |
| 1165 Heap::decreaseAllocatedSpace(object->size()); | 1166 Heap::decreaseAllocatedSpace(object->size()); |
| 1166 | 1167 |
| 1167 // Unpoison the object header and allocationGranularity bytes after the | 1168 // Unpoison the object header and allocationGranularity bytes after the |
| 1168 // object before freeing. | 1169 // object before freeing. |
| 1169 ASAN_UNPOISON_MEMORY_REGION(object->heapObjectHeader(), sizeof(HeapObjectHea
der)); | 1170 ASAN_UNPOISON_MEMORY_REGION(object->heapObjectHeader(), sizeof(HeapObjectHea
der)); |
| 1170 ASAN_UNPOISON_MEMORY_REGION(object->address() + object->size(), allocationGr
anularity); | 1171 ASAN_UNPOISON_MEMORY_REGION(object->address() + object->size(), allocationGr
anularity); |
| 1171 | 1172 |
| 1172 if (object->terminating()) { | 1173 if (object->terminating()) { |
| 1173 ASSERT(ThreadState::current()->isTerminating()); | 1174 ASSERT(ThreadState::current()->isTerminating()); |
| (...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2730 size_t Heap::s_allocatedObjectSize = 0; | 2731 size_t Heap::s_allocatedObjectSize = 0; |
| 2731 size_t Heap::s_allocatedSpace = 0; | 2732 size_t Heap::s_allocatedSpace = 0; |
| 2732 size_t Heap::s_markedObjectSize = 0; | 2733 size_t Heap::s_markedObjectSize = 0; |
| 2733 // We don't want to use 0 KB for the initial value because it may end up | 2734 // We don't want to use 0 KB for the initial value because it may end up |
| 2734 // triggering the first GC of some thread too prematurely. | 2735 // triggering the first GC of some thread too prematurely. |
| 2735 size_t Heap::s_estimatedLiveObjectSize = 512 * 1024; | 2736 size_t Heap::s_estimatedLiveObjectSize = 512 * 1024; |
| 2736 size_t Heap::s_externalObjectSizeAtLastGC = 0; | 2737 size_t Heap::s_externalObjectSizeAtLastGC = 0; |
| 2737 double Heap::s_estimatedMarkingTimePerByte = 0.0; | 2738 double Heap::s_estimatedMarkingTimePerByte = 0.0; |
| 2738 | 2739 |
| 2739 } // namespace blink | 2740 } // namespace blink |
| OLD | NEW |