Change Remote Cache default size

With the new snmalloc2 changes it seems the larger window is leading to
more fragmentation and harming performance.  Reducing size still
provides good batching, improves memory overhead.
This commit is contained in:
Matthew Parkinson
2021-10-28 14:28:01 +01:00
committed by Matthew Parkinson
parent 19de27fdaf
commit dd5c91eb43

View File

@@ -16,14 +16,6 @@ namespace snmalloc
#endif
;
// Return remote small allocs when the local cache reaches this size.
static constexpr int64_t REMOTE_CACHE =
#ifdef USE_REMOTE_CACHE
USE_REMOTE_CACHE
#else
1 << 20
#endif
;
enum DecommitStrategy
{
/**
@@ -91,4 +83,13 @@ namespace snmalloc
static_assert(
MIN_ALLOC_SIZE >= (sizeof(void*) * 2),
"MIN_ALLOC_SIZE must be sufficient for two pointers");
// Return remote small allocs when the local cache reaches this size.
static constexpr int64_t REMOTE_CACHE =
#ifdef USE_REMOTE_CACHE
USE_REMOTE_CACHE
#else
1 << MIN_CHUNK_BITS
#endif
;
} // namespace snmalloc