Diff
Modified: trunk/Source/bmalloc/CMakeLists.txt (249064 => 249065)
--- trunk/Source/bmalloc/CMakeLists.txt 2019-08-23 20:31:08 UTC (rev 249064)
+++ trunk/Source/bmalloc/CMakeLists.txt 2019-08-23 20:55:28 UTC (rev 249065)
@@ -29,7 +29,6 @@
bmalloc/Mutex.cpp
bmalloc/ObjectType.cpp
bmalloc/PerProcess.cpp
- bmalloc/PerThread.cpp
bmalloc/Scavenger.cpp
bmalloc/VMHeap.cpp
bmalloc/bmalloc.cpp
Modified: trunk/Source/bmalloc/ChangeLog (249064 => 249065)
--- trunk/Source/bmalloc/ChangeLog 2019-08-23 20:31:08 UTC (rev 249064)
+++ trunk/Source/bmalloc/ChangeLog 2019-08-23 20:55:28 UTC (rev 249065)
@@ -1,3 +1,18 @@
+2019-08-22 Mark Lam <mark....@apple.com>
+
+ Undo disabling of IsoHeaps when Gigacage is off.
+ https://bugs.webkit.org/show_bug.cgi?id=201061
+ <rdar://problem/54622500>
+
+ Reviewed by Saam Barati and Michael Saboff.
+
+ * CMakeLists.txt:
+ * bmalloc.xcodeproj/project.pbxproj:
+ * bmalloc/IsoTLS.cpp:
+ (bmalloc::IsoTLS::determineMallocFallbackState):
+ * bmalloc/PerThread.cpp: Removed.
+ * bmalloc/PerThread.h:
+
2019-08-19 Yusuke Suzuki <ysuz...@apple.com>
[WTF] Add makeUnique<T>, which ensures T is fast-allocated, actual static_assert part
Modified: trunk/Source/bmalloc/bmalloc/IsoTLS.cpp (249064 => 249065)
--- trunk/Source/bmalloc/bmalloc/IsoTLS.cpp 2019-08-23 20:31:08 UTC (rev 249064)
+++ trunk/Source/bmalloc/bmalloc/IsoTLS.cpp 2019-08-23 20:55:28 UTC (rev 249065)
@@ -26,7 +26,6 @@
#include "IsoTLS.h"
#include "Environment.h"
-#include "Gigacage.h"
#include "IsoTLSEntryInlines.h"
#include "IsoTLSInlines.h"
#include "IsoTLSLayout.h"
@@ -184,21 +183,11 @@
if (s_mallocFallbackState != MallocFallbackState::Undecided)
return;
-#if GIGACAGE_ENABLED || BCPU(ARM64)
-#if !BCPU(ARM64)
- if (!Gigacage::shouldBeEnabled()) {
- s_mallocFallbackState = MallocFallbackState::FallBackToMalloc;
- return;
- }
-#endif
const char* env = getenv("bmalloc_IsoHeap");
if (env && (!strcasecmp(env, "false") || !strcasecmp(env, "no") || !strcmp(env, "0")))
s_mallocFallbackState = MallocFallbackState::FallBackToMalloc;
else
s_mallocFallbackState = MallocFallbackState::DoNotFallBack;
-#else
- s_mallocFallbackState = MallocFallbackState::FallBackToMalloc;
-#endif
});
}
Modified: trunk/Source/bmalloc/bmalloc/PerThread.cpp (249064 => 249065)
--- trunk/Source/bmalloc/bmalloc/PerThread.cpp 2019-08-23 20:31:08 UTC (rev 249064)
+++ trunk/Source/bmalloc/bmalloc/PerThread.cpp 2019-08-23 20:55:28 UTC (rev 249065)
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2018 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "PerThread.h"
-
-#include "BExport.h"
-#include "Cache.h"
-#include "Heap.h"
-
-namespace bmalloc {
-
-#if !HAVE_PTHREAD_MACHDEP_H
-
-template<> BEXPORT bool PerThreadStorage<PerHeapKind<Cache>>::s_didInitialize = false;
-template<> BEXPORT pthread_key_t PerThreadStorage<PerHeapKind<Cache>>::s_key = 0;
-template<> BEXPORT std::once_flag PerThreadStorage<PerHeapKind<Cache>>::s_onceFlag = { };
-
-template<> BEXPORT bool PerThreadStorage<PerHeapKind<Heap>>::s_didInitialize = false;
-template<> BEXPORT pthread_key_t PerThreadStorage<PerHeapKind<Heap>>::s_key = 0;
-template<> BEXPORT std::once_flag PerThreadStorage<PerHeapKind<Heap>>::s_onceFlag = { };
-
-#endif
-
-} // namespace bmalloc
Modified: trunk/Source/bmalloc/bmalloc/PerThread.h (249064 => 249065)
--- trunk/Source/bmalloc/bmalloc/PerThread.h 2019-08-23 20:31:08 UTC (rev 249064)
+++ trunk/Source/bmalloc/bmalloc/PerThread.h 2019-08-23 20:55:28 UTC (rev 249065)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2019 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -108,17 +108,10 @@
}
};
-class Cache;
-class Heap;
+template<typename T> bool PerThreadStorage<T>::s_didInitialize;
+template<typename T> pthread_key_t PerThreadStorage<T>::s_key;
+template<typename T> std::once_flag PerThreadStorage<T>::s_onceFlag;
-template<> bool PerThreadStorage<PerHeapKind<Cache>>::s_didInitialize;
-template<> pthread_key_t PerThreadStorage<PerHeapKind<Cache>>::s_key;
-template<> std::once_flag PerThreadStorage<PerHeapKind<Cache>>::s_onceFlag;
-
-template<> bool PerThreadStorage<PerHeapKind<Heap>>::s_didInitialize;
-template<> pthread_key_t PerThreadStorage<PerHeapKind<Heap>>::s_key;
-template<> std::once_flag PerThreadStorage<PerHeapKind<Heap>>::s_onceFlag;
-
#endif
template<typename T>
Modified: trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj (249064 => 249065)
--- trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj 2019-08-23 20:31:08 UTC (rev 249064)
+++ trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj 2019-08-23 20:55:28 UTC (rev 249065)
@@ -130,7 +130,6 @@
4426E2811C838EE0008EB042 /* Logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 4426E27F1C838EE0008EB042 /* Logging.h */; settings = {ATTRIBUTES = (Private, ); }; };
4426E2831C839547008EB042 /* BSoftLinking.h in Headers */ = {isa = PBXBuildFile; fileRef = 4426E2821C839547008EB042 /* BSoftLinking.h */; };
52F47249210BA30200B730BB /* MemoryStatusSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 52F47248210BA2F500B730BB /* MemoryStatusSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 6543DDB420EEAEF3003B23D8 /* PerThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6543DDB320EEAEF3003B23D8 /* PerThread.cpp */; };
6599C5CC1EC3F15900A2F7BB /* AvailableMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6599C5CA1EC3F15900A2F7BB /* AvailableMemory.cpp */; };
6599C5CD1EC3F15900A2F7BB /* AvailableMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 6599C5CB1EC3F15900A2F7BB /* AvailableMemory.h */; settings = {ATTRIBUTES = (Private, ); }; };
7939885B2076EEB60074A2E7 /* BulkDecommit.h in Headers */ = {isa = PBXBuildFile; fileRef = 7939885A2076EEB50074A2E7 /* BulkDecommit.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -282,7 +281,6 @@
4426E27F1C838EE0008EB042 /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = bmalloc/Logging.h; sourceTree = "<group>"; };
4426E2821C839547008EB042 /* BSoftLinking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BSoftLinking.h; path = bmalloc/darwin/BSoftLinking.h; sourceTree = "<group>"; };
52F47248210BA2F500B730BB /* MemoryStatusSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MemoryStatusSPI.h; path = bmalloc/darwin/MemoryStatusSPI.h; sourceTree = "<group>"; };
- 6543DDB320EEAEF3003B23D8 /* PerThread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = PerThread.cpp; path = bmalloc/PerThread.cpp; sourceTree = "<group>"; };
6599C5CA1EC3F15900A2F7BB /* AvailableMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AvailableMemory.cpp; path = bmalloc/AvailableMemory.cpp; sourceTree = "<group>"; };
6599C5CB1EC3F15900A2F7BB /* AvailableMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AvailableMemory.h; path = bmalloc/AvailableMemory.h; sourceTree = "<group>"; };
7939885A2076EEB50074A2E7 /* BulkDecommit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BulkDecommit.h; path = bmalloc/BulkDecommit.h; sourceTree = "<group>"; };
@@ -528,7 +526,6 @@
0F5BF1481F22A8D80029D91D /* PerHeapKind.h */,
0F26A7A42054830D0090A141 /* PerProcess.cpp */,
14446A0717A61FA400F9EA1D /* PerProcess.h */,
- 6543DDB320EEAEF3003B23D8 /* PerThread.cpp */,
144469FD17A61F1F00F9EA1D /* PerThread.h */,
145F6878179E3A4400D65598 /* Range.h */,
148EFAE61D6B953B008E721E /* ScopeExit.h */,
@@ -771,7 +768,6 @@
143CB81C19022BC900B16A45 /* Mutex.cpp in Sources */,
14F271C818EA3990008C152F /* ObjectType.cpp in Sources */,
0F26A7A5205483130090A141 /* PerProcess.cpp in Sources */,
- 6543DDB420EEAEF3003B23D8 /* PerThread.cpp in Sources */,
AD14AD2A202529C700890E3B /* ProcessCheck.mm in Sources */,
0F5BF1521F22E1570029D91D /* Scavenger.cpp in Sources */,
14F271C918EA3990008C152F /* VMHeap.cpp in Sources */,