Changeset 249065 in webkit
- Timestamp:
- Aug 23, 2019, 1:55:28 PM (6 years ago)
- Location:
- trunk/Source/bmalloc
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/bmalloc/CMakeLists.txt
r245940 r249065 30 30 bmalloc/ObjectType.cpp 31 31 bmalloc/PerProcess.cpp 32 bmalloc/PerThread.cpp33 32 bmalloc/Scavenger.cpp 34 33 bmalloc/VMHeap.cpp -
trunk/Source/bmalloc/ChangeLog
r248850 r249065 1 2019-08-22 Mark Lam <mark.lam@apple.com> 2 3 Undo disabling of IsoHeaps when Gigacage is off. 4 https://bugs.webkit.org/show_bug.cgi?id=201061 5 <rdar://problem/54622500> 6 7 Reviewed by Saam Barati and Michael Saboff. 8 9 * CMakeLists.txt: 10 * bmalloc.xcodeproj/project.pbxproj: 11 * bmalloc/IsoTLS.cpp: 12 (bmalloc::IsoTLS::determineMallocFallbackState): 13 * bmalloc/PerThread.cpp: Removed. 14 * bmalloc/PerThread.h: 15 1 16 2019-08-19 Yusuke Suzuki <ysuzuki@apple.com> 2 17 -
trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj
r245908 r249065 131 131 4426E2831C839547008EB042 /* BSoftLinking.h in Headers */ = {isa = PBXBuildFile; fileRef = 4426E2821C839547008EB042 /* BSoftLinking.h */; }; 132 132 52F47249210BA30200B730BB /* MemoryStatusSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 52F47248210BA2F500B730BB /* MemoryStatusSPI.h */; settings = {ATTRIBUTES = (Private, ); }; }; 133 6543DDB420EEAEF3003B23D8 /* PerThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6543DDB320EEAEF3003B23D8 /* PerThread.cpp */; };134 133 6599C5CC1EC3F15900A2F7BB /* AvailableMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6599C5CA1EC3F15900A2F7BB /* AvailableMemory.cpp */; }; 135 134 6599C5CD1EC3F15900A2F7BB /* AvailableMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 6599C5CB1EC3F15900A2F7BB /* AvailableMemory.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 283 282 4426E2821C839547008EB042 /* BSoftLinking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BSoftLinking.h; path = bmalloc/darwin/BSoftLinking.h; sourceTree = "<group>"; }; 284 283 52F47248210BA2F500B730BB /* MemoryStatusSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MemoryStatusSPI.h; path = bmalloc/darwin/MemoryStatusSPI.h; sourceTree = "<group>"; }; 285 6543DDB320EEAEF3003B23D8 /* PerThread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = PerThread.cpp; path = bmalloc/PerThread.cpp; sourceTree = "<group>"; };286 284 6599C5CA1EC3F15900A2F7BB /* AvailableMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AvailableMemory.cpp; path = bmalloc/AvailableMemory.cpp; sourceTree = "<group>"; }; 287 285 6599C5CB1EC3F15900A2F7BB /* AvailableMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AvailableMemory.h; path = bmalloc/AvailableMemory.h; sourceTree = "<group>"; }; … … 529 527 0F26A7A42054830D0090A141 /* PerProcess.cpp */, 530 528 14446A0717A61FA400F9EA1D /* PerProcess.h */, 531 6543DDB320EEAEF3003B23D8 /* PerThread.cpp */,532 529 144469FD17A61F1F00F9EA1D /* PerThread.h */, 533 530 145F6878179E3A4400D65598 /* Range.h */, … … 772 769 14F271C818EA3990008C152F /* ObjectType.cpp in Sources */, 773 770 0F26A7A5205483130090A141 /* PerProcess.cpp in Sources */, 774 6543DDB420EEAEF3003B23D8 /* PerThread.cpp in Sources */,775 771 AD14AD2A202529C700890E3B /* ProcessCheck.mm in Sources */, 776 772 0F5BF1521F22E1570029D91D /* Scavenger.cpp in Sources */, -
trunk/Source/bmalloc/bmalloc/IsoTLS.cpp
r247714 r249065 27 27 28 28 #include "Environment.h" 29 #include "Gigacage.h"30 29 #include "IsoTLSEntryInlines.h" 31 30 #include "IsoTLSInlines.h" … … 185 184 return; 186 185 187 #if GIGACAGE_ENABLED || BCPU(ARM64)188 #if !BCPU(ARM64)189 if (!Gigacage::shouldBeEnabled()) {190 s_mallocFallbackState = MallocFallbackState::FallBackToMalloc;191 return;192 }193 #endif194 186 const char* env = getenv("bmalloc_IsoHeap"); 195 187 if (env && (!strcasecmp(env, "false") || !strcasecmp(env, "no") || !strcmp(env, "0"))) … … 197 189 else 198 190 s_mallocFallbackState = MallocFallbackState::DoNotFallBack; 199 #else200 s_mallocFallbackState = MallocFallbackState::FallBackToMalloc;201 #endif202 191 }); 203 192 } -
trunk/Source/bmalloc/bmalloc/PerThread.cpp
r233773 r249065 1 /*2 * Copyright (C) 2018 Apple Inc. All rights reserved.3 *4 * Redistribution and use in source and binary forms, with or without5 * modification, are permitted provided that the following conditions6 * are met:7 * 1. Redistributions of source code must retain the above copyright8 * notice, this list of conditions and the following disclaimer.9 * 2. Redistributions in binary form must reproduce the above copyright10 * notice, this list of conditions and the following disclaimer in the11 * documentation and/or other materials provided with the distribution.12 *13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.24 */25 26 #include "PerThread.h"27 28 #include "BExport.h"29 #include "Cache.h"30 #include "Heap.h"31 32 namespace bmalloc {33 34 #if !HAVE_PTHREAD_MACHDEP_H35 36 template<> BEXPORT bool PerThreadStorage<PerHeapKind<Cache>>::s_didInitialize = false;37 template<> BEXPORT pthread_key_t PerThreadStorage<PerHeapKind<Cache>>::s_key = 0;38 template<> BEXPORT std::once_flag PerThreadStorage<PerHeapKind<Cache>>::s_onceFlag = { };39 40 template<> BEXPORT bool PerThreadStorage<PerHeapKind<Heap>>::s_didInitialize = false;41 template<> BEXPORT pthread_key_t PerThreadStorage<PerHeapKind<Heap>>::s_key = 0;42 template<> BEXPORT std::once_flag PerThreadStorage<PerHeapKind<Heap>>::s_onceFlag = { };43 44 #endif45 46 } // namespace bmalloc -
trunk/Source/bmalloc/bmalloc/PerThread.h
r233773 r249065 1 1 /* 2 * Copyright (C) 2014-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2014-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 109 109 }; 110 110 111 class Cache; 112 class Heap; 113 114 template<> bool PerThreadStorage<PerHeapKind<Cache>>::s_didInitialize; 115 template<> pthread_key_t PerThreadStorage<PerHeapKind<Cache>>::s_key; 116 template<> std::once_flag PerThreadStorage<PerHeapKind<Cache>>::s_onceFlag; 117 118 template<> bool PerThreadStorage<PerHeapKind<Heap>>::s_didInitialize; 119 template<> pthread_key_t PerThreadStorage<PerHeapKind<Heap>>::s_key; 120 template<> std::once_flag PerThreadStorage<PerHeapKind<Heap>>::s_onceFlag; 111 template<typename T> bool PerThreadStorage<T>::s_didInitialize; 112 template<typename T> pthread_key_t PerThreadStorage<T>::s_key; 113 template<typename T> std::once_flag PerThreadStorage<T>::s_onceFlag; 121 114 122 115 #endif
Note:
See TracChangeset
for help on using the changeset viewer.