mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-06 23:39:31 +03:00
improve TLS access on Windows with msvc (by Frank Richter, issue #1078)
This commit is contained in:
parent
417e8176bd
commit
e4c5d09d65
2 changed files with 6 additions and 3 deletions
|
@ -282,8 +282,8 @@
|
|||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="mimalloc-lib.vcxproj">
|
||||
<Project>{abb5eae7-b3e6-432e-b636-333449892ea6}</Project>
|
||||
<ProjectReference Include="mimalloc-override-dll.vcxproj">
|
||||
<Project>{abb5eae7-b3e6-432e-b636-333449892ea7}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
|
|
@ -270,6 +270,9 @@ static inline void mi_prim_tls_slot_set(size_t slot, void* value) mi_attr_noexce
|
|||
|
||||
|
||||
// defined in `init.c`; do not use these directly
|
||||
#ifdef _MSC_VER
|
||||
__declspec(selectany) // make it part of the comdat section to have faster TLS access (issue #1078)
|
||||
#endif
|
||||
extern mi_decl_thread mi_heap_t* _mi_heap_default; // default heap to allocate from
|
||||
extern bool _mi_process_is_initialized; // has mi_process_init been called?
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue