On Sun, Mar 20, 2011 at 6:16 PM, <s...@apache.org> wrote: > Author: sf > Date: Sun Mar 20 22:16:26 2011 > New Revision: 1083599 > > URL: http://svn.apache.org/viewvc?rev=1083599&view=rev > Log: > Backport r1072165, but mark as experimental in CHANGES and "configure --help" > for now: > > Add new configure option --enable-allocator-uses-mmap to use mmap > instead of malloc in apr_allocator_alloc(). This greatly reduces > memory fragmentation with malloc implementations (e.g. glibc) that > don't handle allocationss of a page-size-multiples in an efficient way. > It also makes apr_allocator_max_free_set() actually have some effect > on such platforms. > > The handling of page sizes other than 4k seems like a lot of trouble for a > very small number of platforms, but there does not seem to be a reasonable > way to check this at compile time. > > > Modified: > apr/apr/branches/1.4.x/ (props changed) > apr/apr/branches/1.4.x/CHANGES > apr/apr/branches/1.4.x/configure.in > apr/apr/branches/1.4.x/memory/unix/apr_pools.c > > Modified: apr/apr/branches/1.4.x/configure.in > URL: > http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/configure.in?rev=1083599&r1=1083598&r2=1083599&view=diff > ============================================================================== > --- apr/apr/branches/1.4.x/configure.in (original) > +++ apr/apr/branches/1.4.x/configure.in Sun Mar 20 22:16:26 2011 > @@ -1544,6 +1544,18 @@ if test "$netdbh" = "1"; then > fi > fi > > +AC_ARG_ENABLE(allocator-uses-mmap, > + [ --enable-allocator-uses-mmap Use mmap in apr_allocator instead of > malloc (experimental)], > + [ if test "$enableval" = "yes"; then > + APR_IFALLYES(header:sys/mman.h func:mmap func:munmap define:MAP_ANON, > + [AC_DEFINE(APR_ALLOCATOR_USES_MMAP, 1, > + [Define if apr_allocator should use mmap]) ], > + [AC_MSG_ERROR([mmap()/MAP_ANON not supported]) ] > + ) > + fi ], > + [ ]
This last ",\n[]" causes a shell script error for me on MinGW using autoconf 2.67 and bash 3.1. Perhaps it is a system problem (no issues for me in my normal env), but the argument is not in apr trunk and I can't fathom why an empty action-if-option-not-given is useful, so I will yank.