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 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 void* operator new(size_t, NotNullTag, void* location) { return location
; } \ | 1039 void* operator new(size_t, NotNullTag, void* location) { return location
; } \ |
1040 void* operator new(size_t, void* location) { return location; }
\ | 1040 void* operator new(size_t, void* location) { return location; }
\ |
1041 DISALLOW_ALLOCATION() | 1041 DISALLOW_ALLOCATION() |
1042 | 1042 |
1043 // These macros insert annotations that the Blink GC plugin for clang uses for | 1043 // These macros insert annotations that the Blink GC plugin for clang uses for |
1044 // verification. STACK_ALLOCATED is used to declare that objects of this type | 1044 // verification. STACK_ALLOCATED is used to declare that objects of this type |
1045 // are always stack allocated. GC_PLUGIN_IGNORE is used to make the plugin | 1045 // are always stack allocated. GC_PLUGIN_IGNORE is used to make the plugin |
1046 // ignore a particular class or field when checking for proper usage. When using | 1046 // ignore a particular class or field when checking for proper usage. When using |
1047 // GC_PLUGIN_IGNORE a bug-number should be provided as an argument where the | 1047 // GC_PLUGIN_IGNORE a bug-number should be provided as an argument where the |
1048 // bug describes what needs to happen to remove the GC_PLUGIN_IGNORE again. | 1048 // bug describes what needs to happen to remove the GC_PLUGIN_IGNORE again. |
1049 #if COMPILER(CLANG) | 1049 #if COMPILER(CLANG) && !defined(ADDRESS_SANITIZER) |
1050 #define STACK_ALLOCATED() \ | 1050 #define STACK_ALLOCATED() \ |
1051 private: \ | 1051 private: \ |
1052 __attribute__((annotate("blink_stack_allocated"))) \ | 1052 __attribute__((annotate("blink_stack_allocated"))) \ |
1053 void* operator new(size_t) = delete; | 1053 void* operator new(size_t) = delete; |
1054 #define GC_PLUGIN_IGNORE(bug) \ | 1054 #define GC_PLUGIN_IGNORE(bug) \ |
1055 __attribute__((annotate("blink_gc_plugin_ignore"))) | 1055 __attribute__((annotate("blink_gc_plugin_ignore"))) |
1056 #else | 1056 #else |
1057 #define STACK_ALLOCATED() DISALLOW_ALLOCATION() | 1057 #define STACK_ALLOCATED() DISALLOW_ALLOCATION() |
1058 #define GC_PLUGIN_IGNORE(bug) | 1058 #define GC_PLUGIN_IGNORE(bug) |
1059 #endif | 1059 #endif |
1060 | 1060 |
1061 NO_SANITIZE_ADDRESS | 1061 NO_SANITIZE_ADDRESS |
1062 void HeapObjectHeader::checkHeader() const | 1062 void HeapObjectHeader::checkHeader() const |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1715 // to export. This forces it to export all the methods from ThreadHeap. | 1715 // to export. This forces it to export all the methods from ThreadHeap. |
1716 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf
o*); | 1716 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf
o*); |
1717 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); | 1717 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); |
1718 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; | 1718 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; |
1719 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>; | 1719 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>; |
1720 #endif | 1720 #endif |
1721 | 1721 |
1722 } | 1722 } |
1723 | 1723 |
1724 #endif // Heap_h | 1724 #endif // Heap_h |
OLD | NEW |