CVS update: php3/functions

From: Date: Sat, 22 May 1999 16:52:54 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-5878@lists.php.net to get a copy of this message
Date: Saturday May 22, 1999 @ 12:52 Author: sas Update of /repository/php3/functions In directory php:/tmp/cvs-serv9694/functions Modified Files: fsock.c Log Message: Complete persistent support - uses pemalloc and friends now Index: php3/functions/fsock.c diff -u php3/functions/fsock.c:1.98 php3/functions/fsock.c:1.99 --- php3/functions/fsock.c:1.98 Fri May 21 05:44:33 1999 +++ php3/functions/fsock.c Sat May 22 12:52:53 1999 @@ -27,7 +27,7 @@ | Jim Winstead (jimw@php.net) | +----------------------------------------------------------------------+ */ -/* $Id: fsock.c,v 1.98 1999/05/21 09:44:33 sas Exp $ */ +/* $Id: fsock.c,v 1.99 1999/05/22 16:52:53 sas Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif @@ -303,10 +303,10 @@ for(now = phpsockbuf; now; now = next) { next = now->next; if(now->persistent == persistent) { - if(now->readbuf) efree(now->readbuf); + if(now->readbuf) pefree(now->readbuf, persistent); if(now == phpsockbuf) phpsockbuf = next; - efree(now); + pefree(now, persistent); } } } @@ -331,11 +331,12 @@ static php3i_sockbuf *_php3_sock_create(int socket) { php3i_sockbuf *sock; + int persistent = _php3_is_persistent_sock(socket); - sock = ecalloc(sizeof(*sock), 1); + sock = pecalloc(sizeof(*sock), 1, persistent); sock->socket = socket; sock->next = phpsockbuf; - sock->persistent = _php3_is_persistent_sock(socket); + sock->persistent = persistent; phpsockbuf = sock; return sock; @@ -359,7 +360,8 @@ if(nr_bytes > 0) { if(sock->writepos + nr_bytes > sock->readbuflen) { sock->readbuflen += CHUNK_SIZE; - sock->readbuf = erealloc(sock->readbuf, sock->readbuflen); + sock->readbuf = perealloc(sock->readbuf, sock->readbuflen, + sock->persistent); } memcpy(WRITEPTR(sock), buf, nr_bytes); sock->writepos += nr_bytes; -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#5878) next »