Bug 1682556 - Increase vm_copy() threshold. r=glandium

The current implementation is a regression on microbenchmarks that
reallocate allocations that go over gPageSize * 32 compared to memcpy().

Differential Revision: https://phabricator.services.mozilla.com/D100217
This commit is contained in:
Emilio Cobos Álvarez 2020-12-23 01:35:22 +00:00
parent d4a3d63f71
commit 5c86c09175

View File

@ -1580,7 +1580,7 @@ static void* pages_map(void* aAddr, size_t aSize) {
#endif #endif
#ifdef XP_DARWIN #ifdef XP_DARWIN
# define VM_COPY_MIN (gPageSize * 32) # define VM_COPY_MIN kChunkSize
static inline void pages_copy(void* dest, const void* src, size_t n) { static inline void pages_copy(void* dest, const void* src, size_t n) {
MOZ_ASSERT((void*)((uintptr_t)dest & ~gPageSizeMask) == dest); MOZ_ASSERT((void*)((uintptr_t)dest & ~gPageSizeMask) == dest);
MOZ_ASSERT(n >= VM_COPY_MIN); MOZ_ASSERT(n >= VM_COPY_MIN);