From cd567c063ec25b280d3fb5686a69b068c2d6d6df Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Wed, 10 Aug 2011 16:58:38 +0530 Subject: 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 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- rpc/rpc-transport/rdma/src/rdma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rpc/rpc-transport') diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c index d170c0d66d4..e881484600d 100644 --- a/rpc/rpc-transport/rdma/src/rdma.c +++ b/rpc/rpc-transport/rdma/src/rdma.c @@ -300,7 +300,7 @@ __rdma_ioq_entry_free (rdma_ioq_t *entry) entry->msg.request.rsp_iobref = NULL; } /* TODO: use mem-pool */ - mem_put (entry->pool, entry); + mem_put (entry); } @@ -795,7 +795,7 @@ __rdma_request_context_destroy (rdma_request_context_t *context) gf_log ("rdma", GF_LOG_DEBUG, "failed to send " "message"); - mem_put (context->pool, context); + mem_put (context); __rdma_disconnect (peer->trans); goto out; } @@ -811,7 +811,7 @@ __rdma_request_context_destroy (rdma_request_context_t *context) context->rsp_iobref = NULL; } - mem_put (context->pool, context); + mem_put (context); out: return; @@ -1602,7 +1602,7 @@ rdma_reply_info_destroy (rdma_reply_info_t *reply_info) reply_info->wc_array = NULL; } - mem_put (reply_info->pool, reply_info); + mem_put (reply_info); out: return; } -- cgit