aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2013-06-14 09:56:55 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2013-06-14 09:56:55 +0100
commit64c7bd14df859791522482fea6a5893b67ddc33e (patch)
treed4b25cfbff709d6e8753f49cefbe99d4541cda73
parentevas/cserve2: remove garbage shm files during server init (diff)
downloadefl-64c7bd14df859791522482fea6a5893b67ddc33e.tar.gz
eina/mp/one_big: Add a comment to clarify why we do not memset the complete memory.
To avoid people getting confused over this code, like myself, add a comment to clarify that only the elements need to be set to zero while the payload does not matter here.
-rw-r--r--src/modules/eina/mp/one_big/eina_one_big.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/modules/eina/mp/one_big/eina_one_big.c b/src/modules/eina/mp/one_big/eina_one_big.c
index 2fbd75915d..e658013382 100644
--- a/src/modules/eina/mp/one_big/eina_one_big.c
+++ b/src/modules/eina/mp/one_big/eina_one_big.c
@@ -125,6 +125,7 @@ eina_one_big_malloc(void *data, EINA_UNUSED unsigned int size)
else
{
pool->over++;
+ /* Only need to zero list elements and not the payload here */
memset(mem, 0, sizeof(Eina_Inlist));
pool->over_list = eina_inlist_append(pool->over_list,
(Eina_Inlist *)mem);