From: raster Date: Sun, 22 Aug 2010 22:35:24 +0000 (+0000) Subject: mempool -> init the mempool with calloc. we cannot know for sure the X-Git-Tag: 2.0_alpha~70^2~376 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c217d258a62a30314db07044dec4d0e8cb8062f;p=framework%2Fuifw%2Feina.git mempool -> init the mempool with calloc. we cannot know for sure the mempool backend inits all members, so make sure they are set to 0. not a cost worth quibbling over. how many mempools do you really create during the life of an app? git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@51548 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/eina_mempool.c b/src/lib/eina_mempool.c index 0d37861..b9062be 100644 --- a/src/lib/eina_mempool.c +++ b/src/lib/eina_mempool.c @@ -76,7 +76,7 @@ _new_va(const char *name, goto on_error; err = EINA_ERROR_OUT_OF_MEMORY; - mp = malloc(sizeof(Eina_Mempool)); + mp = calloc(1, sizeof(Eina_Mempool)); if (!mp) goto on_error;