| 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 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 // scanning the heap page for an object header. | 995 // scanning the heap page for an object header. |
| 996 static const GCInfo* findGCInfo(Address); | 996 static const GCInfo* findGCInfo(Address); |
| 997 | 997 |
| 998 static String createBacktraceString(); | 998 static String createBacktraceString(); |
| 999 #endif | 999 #endif |
| 1000 | 1000 |
| 1001 static size_t objectPayloadSizeForTesting(); | 1001 static size_t objectPayloadSizeForTesting(); |
| 1002 | 1002 |
| 1003 static void flushHeapDoesNotContainCache(); | 1003 static void flushHeapDoesNotContainCache(); |
| 1004 | 1004 |
| 1005 // Return true if the last GC found a pointer into a heap page | |
| 1006 // during conservative scanning. | |
| 1007 static bool lastGCWasConservative() { return s_lastGCWasConservative; } | |
| 1008 | |
| 1009 static FreePagePool* freePagePool() { return s_freePagePool; } | 1005 static FreePagePool* freePagePool() { return s_freePagePool; } |
| 1010 static OrphanedPagePool* orphanedPagePool() { return s_orphanedPagePool; } | 1006 static OrphanedPagePool* orphanedPagePool() { return s_orphanedPagePool; } |
| 1011 | 1007 |
| 1012 // This look-up uses the region search tree and a negative contains cache to | 1008 // This look-up uses the region search tree and a negative contains cache to |
| 1013 // provide an efficient mapping from arbitrary addresses to the containing | 1009 // provide an efficient mapping from arbitrary addresses to the containing |
| 1014 // heap-page if one exists. | 1010 // heap-page if one exists. |
| 1015 static BasePage* lookup(Address); | 1011 static BasePage* lookup(Address); |
| 1016 static void addPageMemoryRegion(PageMemoryRegion*); | 1012 static void addPageMemoryRegion(PageMemoryRegion*); |
| 1017 static void removePageMemoryRegion(PageMemoryRegion*); | 1013 static void removePageMemoryRegion(PageMemoryRegion*); |
| 1018 | 1014 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 | 1062 |
| 1067 static int heapIndexForObjectSize(size_t); | 1063 static int heapIndexForObjectSize(size_t); |
| 1068 static bool isNormalHeapIndex(int); | 1064 static bool isNormalHeapIndex(int); |
| 1069 | 1065 |
| 1070 static CallbackStack* s_markingStack; | 1066 static CallbackStack* s_markingStack; |
| 1071 static CallbackStack* s_postMarkingCallbackStack; | 1067 static CallbackStack* s_postMarkingCallbackStack; |
| 1072 static CallbackStack* s_globalWeakCallbackStack; | 1068 static CallbackStack* s_globalWeakCallbackStack; |
| 1073 static CallbackStack* s_ephemeronStack; | 1069 static CallbackStack* s_ephemeronStack; |
| 1074 static HeapDoesNotContainCache* s_heapDoesNotContainCache; | 1070 static HeapDoesNotContainCache* s_heapDoesNotContainCache; |
| 1075 static bool s_shutdownCalled; | 1071 static bool s_shutdownCalled; |
| 1076 static bool s_lastGCWasConservative; | |
| 1077 static FreePagePool* s_freePagePool; | 1072 static FreePagePool* s_freePagePool; |
| 1078 static OrphanedPagePool* s_orphanedPagePool; | 1073 static OrphanedPagePool* s_orphanedPagePool; |
| 1079 static RegionTree* s_regionTree; | 1074 static RegionTree* s_regionTree; |
| 1080 static size_t s_allocatedSpace; | 1075 static size_t s_allocatedSpace; |
| 1081 static size_t s_allocatedObjectSize; | 1076 static size_t s_allocatedObjectSize; |
| 1082 static size_t s_markedObjectSize; | 1077 static size_t s_markedObjectSize; |
| 1083 static size_t s_estimatedLiveObjectSize; | 1078 static size_t s_estimatedLiveObjectSize; |
| 1084 static size_t s_externalObjectSizeAtLastGC; | 1079 static size_t s_externalObjectSizeAtLastGC; |
| 1085 static double s_estimatedMarkingTimePerByte; | 1080 static double s_estimatedMarkingTimePerByte; |
| 1086 | 1081 |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1390 size_t copySize = previousHeader->payloadSize(); | 1385 size_t copySize = previousHeader->payloadSize(); |
| 1391 if (copySize > size) | 1386 if (copySize > size) |
| 1392 copySize = size; | 1387 copySize = size; |
| 1393 memcpy(address, previous, copySize); | 1388 memcpy(address, previous, copySize); |
| 1394 return address; | 1389 return address; |
| 1395 } | 1390 } |
| 1396 | 1391 |
| 1397 } // namespace blink | 1392 } // namespace blink |
| 1398 | 1393 |
| 1399 #endif // Heap_h | 1394 #endif // Heap_h |
| OLD | NEW |