mempool -> init the mempool with calloc. we cannot know for sure the
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 22 Aug 2010 22:35:24 +0000 (22:35 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 22 Aug 2010 22:35:24 +0000 (22:35 +0000)
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

src/lib/eina_mempool.c

index 0d37861..b9062be 100644 (file)
@@ -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;