Fixes
This commit is contained in:
@@ -133,9 +133,9 @@ namespace snmalloc
|
||||
inline void prefetch(void* ptr)
|
||||
{
|
||||
#if defined(PLATFORM_IS_X86)
|
||||
_mm_prefetch(reinterpret_cast<const char *>(ptr), _MM_HINT_T0);
|
||||
_mm_prefetch(reinterpret_cast<const char*>(ptr), _MM_HINT_T0);
|
||||
#else
|
||||
# warning "Missing pause intrinsic"
|
||||
# warning "Missing prefetch intrinsic"
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -837,8 +837,10 @@ namespace snmalloc
|
||||
{
|
||||
// Manufacture an allocation to prime the queue
|
||||
// Using an actual allocation removes a conditional of a critical path.
|
||||
message_queue().init(
|
||||
reinterpret_cast<Remote*>(alloc<YesZero>(MIN_ALLOC_SIZE)));
|
||||
Remote* remote =
|
||||
reinterpret_cast<Remote*>(alloc<YesZero>(MIN_ALLOC_SIZE));
|
||||
remote->set_target_id(id());
|
||||
message_queue().init(remote);
|
||||
}
|
||||
|
||||
SNMALLOC_FAST_PATH void handle_dealloc_remote(Remote* p)
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace snmalloc
|
||||
return sizeclass_metadata.cache_friendly_mask[sizeclass];
|
||||
}
|
||||
|
||||
constexpr static inline size_t
|
||||
constexpr static SNMALLOC_FAST_PATH size_t
|
||||
sizeclass_to_inverse_cache_friendly_mask(sizeclass_t sizeclass)
|
||||
{
|
||||
return sizeclass_metadata.inverse_cache_friendly_mask[sizeclass];
|
||||
|
||||
Reference in New Issue
Block a user