struct memcache *smbd_memcache(void) { if (!smbd_memcache_ctx) { smbd_memcache_ctx = memcache_init(talloc_autofree_context(), lp_max_stat_cache_size()*1024); } if (!smbd_memcache_ctx) { smb_panic("Could not init smbd memcache"); } return smbd_memcache_ctx; }
struct memcache *smbd_memcache(void) { if (!smbd_memcache_ctx) { /* * Note we MUST use the NULL context here, not the * autofree context, to avoid side effects in forked * children exiting. */ smbd_memcache_ctx = memcache_init(NULL, lp_max_stat_cache_size()*1024); } if (!smbd_memcache_ctx) { smb_panic("Could not init smbd memcache"); } return smbd_memcache_ctx; }