happyfish100 / libshmcache

libshmcache is a local cache in the share memory for multi processes. high performance due to read is lockless. libshmcache is 100+ times faster than a remote interface such as redis.
449 stars 136 forks source link

计算 value_max_memory 错误 #8

Closed friskfly closed 6 years ago

friskfly commented 7 years ago

https://github.com/happyfish100/libshmcache/blob/master/src/shmcache.c#L132 这里有可能出现 config.max_memory - total_size 小于0的情况,比如max_key_count 比较大,1000000的时候。