diff options
author | dormando <dormando@rydia.net> | 2020-03-26 11:24:20 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2020-03-26 11:24:20 -0700 |
commit | cb0de8114921f09adf97397b08b238fbcb9f8ab4 (patch) | |
tree | 14740530f450b3acfc7c9e9468a9c8c980e5f9ee /slabs.c | |
parent | 5174ef33576f461d43f43b2019f5e10655b4c78f (diff) | |
download | memcached-cb0de8114921f09adf97397b08b238fbcb9f8ab4.tar.gz |
restart: always wipe memory from global pool
An ifdef was added for FreeBSD at some point since it gives you 0'd out
memory from malloc, but memory from the global pool isn't always from
malloc.
Diffstat (limited to 'slabs.c')
-rw-r--r-- | slabs.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -381,9 +381,11 @@ static int do_slabs_newslab(const unsigned int id) { return 0; } -#if !defined(__FreeBSD__) + // Always wipe the memory at this stage: in restart mode the mmap memory + // could be unused, yet still full of data. Better for usability if we're + // wiping memory as it's being pulled out of the global pool instead of + // blocking startup all at once. memset(ptr, 0, (size_t)len); -#endif split_slab_page_into_freelist(ptr, id); p->slab_list[p->slabs++] = ptr; |