From ea422a45760762ea103f7d0fadebd944c6cc2fc5 Mon Sep 17 00:00:00 2001 From: Roberto De Ioris Date: Mon, 29 Oct 2012 09:29:43 +0100 Subject: [PATCH] fixed cache size reporting in 32bit --- core/cache.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/cache.c b/core/cache.c index f6f75f12..015980fb 100644 --- a/core/cache.c +++ b/core/cache.c @@ -85,8 +85,11 @@ void uwsgi_init_cache() { uwsgi.cache_lock = uwsgi_rwlock_init("cache"); - uwsgi_log("*** Cache subsystem initialized: %dMB (key: %llu bytes, keys: %llu bytes, data: %llu bytes) preallocated ***\n", ((uwsgi.cache_blocksize * uwsgi.cache_max_items) + (sizeof(struct uwsgi_cache_item) * uwsgi.cache_max_items)) / (1024 * 1024), - (unsigned long long) sizeof(struct uwsgi_cache_item), (unsigned long long) sizeof(struct uwsgi_cache_item) * uwsgi.cache_max_items, (unsigned long long) uwsgi.cache_blocksize * uwsgi.cache_max_items); + uwsgi_log("*** Cache subsystem initialized: %lluMB (key: %llu bytes, keys: %llu bytes, data: %llu bytes) preallocated ***\n", + (unsigned long long) ((uwsgi.cache_blocksize * uwsgi.cache_max_items) + (sizeof(struct uwsgi_cache_item) * uwsgi.cache_max_items)) / (1024 * 1024), + (unsigned long long) sizeof(struct uwsgi_cache_item), + (unsigned long long) (sizeof(struct uwsgi_cache_item) * uwsgi.cache_max_items), + (unsigned long long) (uwsgi.cache_blocksize * uwsgi.cache_max_items)); } uint32_t djb33x_hash(char *key, int keylen) {