summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimo Dritschler <timo.dritschler@kit.edu>2014-11-26 18:12:01 +0100
committerTimo Dritschler <timo.dritschler@kit.edu>2014-11-26 18:16:28 +0100
commit8d6149084c6c66dc0514021264128bb2a2458930 (patch)
treeaff205a477f4cc99af11a54080e0ee17b4a92079 /src
parentd4e6eed9058ef9e2e7bf7530285416a042f06f04 (diff)
downloadkiro-8d6149084c6c66dc0514021264128bb2a2458930.tar.gz
kiro-8d6149084c6c66dc0514021264128bb2a2458930.tar.bz2
kiro-8d6149084c6c66dc0514021264128bb2a2458930.tar.xz
kiro-8d6149084c6c66dc0514021264128bb2a2458930.zip
Removed superfluous memory allocations in kiro server and client
Diffstat (limited to 'src')
-rw-r--r--src/kiro-client.c10
-rw-r--r--src/kiro-server.c8
2 files changed, 0 insertions, 18 deletions
diff --git a/src/kiro-client.c b/src/kiro-client.c
index 8fa582b..b561b7a 100644
--- a/src/kiro-client.c
+++ b/src/kiro-client.c
@@ -158,16 +158,6 @@ kiro_client_connect (KiroClient *self, const char *address, const char *port)
return -1;
}
- ctx->cf_mr_send = (struct kiro_rdma_mem *)calloc (1, sizeof (struct kiro_rdma_mem));
- ctx->cf_mr_recv = (struct kiro_rdma_mem *)calloc (1, sizeof (struct kiro_rdma_mem));
-
- if (!ctx->cf_mr_recv || !ctx->cf_mr_send) {
- g_critical ("Failed to allocate Control Flow Memory Container (Out of memory?)");
- kiro_destroy_connection_context (&ctx);
- rdma_destroy_ep (priv->conn);
- return -1;
- }
-
ctx->cf_mr_recv = kiro_create_rdma_memory (priv->conn->pd, sizeof (struct kiro_ctrl_msg), IBV_ACCESS_LOCAL_WRITE);
ctx->cf_mr_send = kiro_create_rdma_memory (priv->conn->pd, sizeof (struct kiro_ctrl_msg), IBV_ACCESS_LOCAL_WRITE);
diff --git a/src/kiro-server.c b/src/kiro-server.c
index 91c86ec..b35d1d5 100644
--- a/src/kiro-server.c
+++ b/src/kiro-server.c
@@ -133,14 +133,6 @@ connect_client (struct rdma_cm_id *client)
return -1;
}
- ctx->cf_mr_send = (struct kiro_rdma_mem *)calloc (1, sizeof (struct kiro_rdma_mem));
- ctx->cf_mr_recv = (struct kiro_rdma_mem *)calloc (1, sizeof (struct kiro_rdma_mem));
-
- if (!ctx->cf_mr_recv || !ctx->cf_mr_send) {
- g_critical ("Failed to allocate Control Flow Memory Container");
- goto error;
- }
-
ctx->cf_mr_recv = kiro_create_rdma_memory (client->pd, sizeof (struct kiro_ctrl_msg), IBV_ACCESS_LOCAL_WRITE);
ctx->cf_mr_send = kiro_create_rdma_memory (client->pd, sizeof (struct kiro_ctrl_msg), IBV_ACCESS_LOCAL_WRITE);