cvs: pecl /apc apc_sma.c
| From: | Rasmus Lerdorf | Date: | Sun, 26 Feb 2006 23:30:48 +0000 |
| Subject: | cvs: pecl /apc apc_sma.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-5276@lists.php.net to get a copy of this message | ||
rasmus Sun Feb 26 23:30:48 2006 UTC
Modified files:
/pecl/apc apc_sma.c
Log:
Report back the correct number of available bytes in the segment instead
of the allocated bytes.
http://cvs.php.net/viewcvs.cgi/pecl/apc/apc_sma.c?r1=1.40&r2=1.41&diff_format=u
Index: pecl/apc/apc_sma.c
diff -u pecl/apc/apc_sma.c:1.40 pecl/apc/apc_sma.c:1.41
--- pecl/apc/apc_sma.c:1.40 Sun Feb 26 19:31:09 2006
+++ pecl/apc/apc_sma.c Sun Feb 26 23:30:48 2006
@@ -26,7 +26,7 @@
*/
-/* $Id: apc_sma.c,v 1.40 2006/02/26 19:31:09 rasmus Exp $ */
+/* $Id: apc_sma.c,v 1.41 2006/02/26 23:30:48 rasmus Exp $ */
#include "apc_sma.h"
#include "apc.h"
@@ -412,7 +412,7 @@
info = (apc_sma_info_t*) apc_emalloc(sizeof(apc_sma_info_t));
info->num_seg = sma_numseg;
- info->seg_size = sma_segsize;
+ info->seg_size = sma_segsize - sizeof(header_t) - sizeof(block_t) - alignword(sizeof(int));
info->list = apc_emalloc(info->num_seg * sizeof(apc_sma_link_t*));
for (i = 0; i < sma_numseg; i++) {