diff options
author | shishir gowda <shishirng@gluster.com> | 2011-08-10 16:58:38 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-08-25 12:01:08 -0700 |
commit | cd567c063ec25b280d3fb5686a69b068c2d6d6df (patch) | |
tree | 636ed83dc9b7e4d7e019dcfc59bbc722f066e2e6 /libglusterfs/src/mem-pool.h | |
parent | 9c68f3b53ffd27ea03e90da883c43e84bf94dd15 (diff) |
mem-pool: Make mem-pool ptr avialable in ptr
The header of the ptr returned from mem-pool will now store the
mem-pool ptr it belongs to. mem_put will now take only the pointer
to be freed.
Also, changing MALLOC call to GF_CALLOC in mem_get when we run out
of entries in mem-pool. This also will have the header information
saved.
Change-Id: I3de182663a7f5b49c9e9425e9531775b70bdff67
BUG: 3390
Reviewed-on: http://review.gluster.com/205
Reviewed-by: Amar Tumballi <amar@gluster.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'libglusterfs/src/mem-pool.h')
-rw-r--r-- | libglusterfs/src/mem-pool.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libglusterfs/src/mem-pool.h b/libglusterfs/src/mem-pool.h index 7092ece30d2..98454c5be6f 100644 --- a/libglusterfs/src/mem-pool.h +++ b/libglusterfs/src/mem-pool.h @@ -152,7 +152,7 @@ mem_pool_new_fn (unsigned long sizeof_type, unsigned long count); #define mem_pool_new(type,count) mem_pool_new_fn (sizeof(type), count) -void mem_put (struct mem_pool *pool, void *ptr); +void mem_put (void *ptr); void *mem_get (struct mem_pool *pool); void *mem_get0 (struct mem_pool *pool); |