Avoid zeroing out all the bytes of every incoming and outgoing data buffer. This has a measurable performance impact. Signed-off-by: Pete Wyckoff <pw at osc.edu> --- usr/iscsi/iscsid.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c index 8fd9099..ae840ad 100644 --- a/usr/iscsi/iscsid.c +++ b/usr/iscsi/iscsid.c @@ -966,9 +966,10 @@ iscsi_alloc_task(struct iscsi_connection *conn, int ext_len) struct iscsi_hdr *req = (struct iscsi_hdr *) &conn->req.bhs; struct iscsi_task *task; - task = zalloc(sizeof(*task) + ext_len); + task = malloc(sizeof(*task) + ext_len); if (!task) return NULL; + memset(task, 0, sizeof(*task)); memcpy(&task->req, req, sizeof(*req)); task->conn = conn; -- 1.5.2.4 |