From b23ca703e81a30f6d1431422c5b93ec4d8754883 Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Tue, 20 Aug 2013 20:54:05 +0100 Subject: [PATCH] replace calloc in server.c with quick fit approach --- src/server/server.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/server.c b/src/server/server.c index 8f76a3a..f58fe09 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -61,8 +61,8 @@ serverCtor(void * _this, va_list * params) port = va_arg(* params, int); backlog = va_arg(* params, unsigned int); - this->fds = calloc(sizeof(struct pollfd), this->max_fds); - this->conns = calloc(sizeof(struct conns), this->max_fds); + this->fds = memCalloc(sizeof(struct pollfd), this->max_fds); + this->conns = memCalloc(sizeof(struct conns), this->max_fds); this->sock = new(Sock, this->logger, port); flags = fcntl(this->sock->handle, F_GETFL, 0); @@ -111,8 +111,8 @@ serverDtor(void * _this) } } - FREE(this->fds); - FREE(this->conns); + MEM_FREE(this->fds); + MEM_FREE(this->conns); delete(this->sock); delete(this->sockSSL);