diff options
author | Jefty Negapatan <jefty.dev@gmail.com> | 2020-04-05 14:38:08 +0200 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2020-04-10 17:29:59 -0700 |
commit | c700682b6f3e2a51681f9ba5c3245501527d81fe (patch) | |
tree | fb3b23490c8f8b1f286da9ed0701a1028f2faaff | |
parent | 651380cd4863033f4668f09c6a96819044e11f69 (diff) | |
download | memcached-c700682b6f3e2a51681f9ba5c3245501527d81fe.tar.gz |
Fix t/64bit.t test failure in Windows.
t/64bit.t .. 1/6
Failed test 'expected (faked) value of total_malloced'
at t/64bit.t line 30.
got: '32'
expected: '4294967328'
Failed test 'hit size limit'
at t/64bit.t line 41.
In Windows, long is just 32-bit even for 64-bit platforms.
-rw-r--r-- | slabs.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -279,7 +279,10 @@ void slabs_init(const size_t limit, const double factor, const bool prealloc, co { char *t_initial_malloc = getenv("T_MEMD_INITIAL_MALLOC"); if (t_initial_malloc) { - mem_malloced = (size_t)atol(t_initial_malloc); + int64_t env_malloced; + if (safe_strtoll((const char *)t_initial_malloc, &env_malloced)) { + mem_malloced = (size_t)env_malloced; + } } } |