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 23 matching lines...) Expand all Loading... |
34 #include "platform/PlatformExport.h" | 34 #include "platform/PlatformExport.h" |
35 #include "platform/heap/BlinkGC.h" | 35 #include "platform/heap/BlinkGC.h" |
36 #include "platform/heap/GCInfo.h" | 36 #include "platform/heap/GCInfo.h" |
37 #include "platform/heap/ThreadState.h" | 37 #include "platform/heap/ThreadState.h" |
38 #include "platform/heap/Visitor.h" | 38 #include "platform/heap/Visitor.h" |
39 #include "wtf/AddressSanitizer.h" | 39 #include "wtf/AddressSanitizer.h" |
40 #include "wtf/Allocator.h" | 40 #include "wtf/Allocator.h" |
41 #include "wtf/Assertions.h" | 41 #include "wtf/Assertions.h" |
42 #include "wtf/ContainerAnnotations.h" | 42 #include "wtf/ContainerAnnotations.h" |
43 #include "wtf/Forward.h" | 43 #include "wtf/Forward.h" |
44 #include "wtf/PageAllocator.h" | 44 #include "wtf/allocator/PageAllocator.h" |
45 #include <stdint.h> | 45 #include <stdint.h> |
46 | 46 |
47 namespace blink { | 47 namespace blink { |
48 | 48 |
49 const size_t blinkPageSizeLog2 = 17; | 49 const size_t blinkPageSizeLog2 = 17; |
50 const size_t blinkPageSize = 1 << blinkPageSizeLog2; | 50 const size_t blinkPageSize = 1 << blinkPageSizeLog2; |
51 const size_t blinkPageOffsetMask = blinkPageSize - 1; | 51 const size_t blinkPageOffsetMask = blinkPageSize - 1; |
52 const size_t blinkPageBaseMask = ~blinkPageOffsetMask; | 52 const size_t blinkPageBaseMask = ~blinkPageOffsetMask; |
53 | 53 |
54 // We allocate pages at random addresses but in groups of | 54 // We allocate pages at random addresses but in groups of |
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 SET_MEMORY_ACCESSIBLE(result, allocationSize - sizeof(HeapObjectHeader))
; | 886 SET_MEMORY_ACCESSIBLE(result, allocationSize - sizeof(HeapObjectHeader))
; |
887 ASSERT(findPageFromAddress(headerAddress + allocationSize - 1)); | 887 ASSERT(findPageFromAddress(headerAddress + allocationSize - 1)); |
888 return result; | 888 return result; |
889 } | 889 } |
890 return outOfLineAllocate(allocationSize, gcInfoIndex); | 890 return outOfLineAllocate(allocationSize, gcInfoIndex); |
891 } | 891 } |
892 | 892 |
893 } // namespace blink | 893 } // namespace blink |
894 | 894 |
895 #endif // HeapPage_h | 895 #endif // HeapPage_h |
OLD | NEW |