You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Maxim Yegorushkin <ma...@gmail.com> on 2008/01/01 23:51:40 UTC
apr_palloc bugfix
Hi there,
Looks like apr_palloc can not allocate the last byte from the node. If
so, here is a patch.
[max@k-pax apr]$ svn diff
Index: memory/unix/apr_pools.c
===================================================================
--- memory/unix/apr_pools.c (revision 607616)
+++ memory/unix/apr_pools.c (working copy)
@@ -633,7 +633,7 @@
active = pool->active;
/* If the active node has enough bytes left, use it. */
- if (size < (apr_size_t)(active->endp - active->first_avail)) {
+ if (size <= (apr_size_t)(active->endp - active->first_avail)) {
mem = active->first_avail;
active->first_avail += size;