Commit ea901094 authored by Stefan Fritsch's avatar Stefan Fritsch
Browse files

Set MaxMemFree 2048 by default


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1201158 13f79535-47bb-0310-9956-ffa450edef68
parent 863723b1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
                                                         -*- coding: utf-8 -*-
Changes with Apache 2.3.16

  *) core: Set MaxMemFree 2048 by default. [Stefan Fritsch]

  *) mpm_event: Fix assertion failure during very high load. [Stefan Fritsch]

  *) configure: Only load the really imporant modules (i.e. those enabled by
+10 −1
Original line number Diff line number Diff line
@@ -92,7 +92,6 @@
    MaxSpareThreads        250
    MaxThreads            1000
    MaxConnectionsPerChild   0
    MaxMemFree             100
</IfModule>

# OS/2 MPM
@@ -116,3 +115,13 @@
    MaxConnectionsPerChild   0
</IfModule>

# The maximum number of free Kbytes that every allocator is allowed
# to hold without calling free(). In threaded MPMs, every thread has its own
# allocator. When not set, or when set to zero, the threshold will be set to
# unlimited.
<IfModule !mpm_netware_module>
    MaxMemFree            2048
</IfModule>
<IfModule mpm_netware_module>
    MaxMemFree             100
</IfModule>
+4 −3
Original line number Diff line number Diff line
@@ -327,7 +327,7 @@ simultaneously</description>
<description>Maximum amount of memory that the main allocator is allowed
to hold without calling <code>free()</code></description>
<syntax>MaxMemFree <var>KBytes</var></syntax>
<default>MaxMemFree 0</default>
<default>MaxMemFree 2048</default>
<contextlist><context>server config</context></contextlist>
<modulelist><module>event</module><module>mpm_netware</module>
<module>prefork</module><module>worker</module><module>mpm_winnt</module>
@@ -335,8 +335,9 @@ to hold without calling <code>free()</code></description>

<usage>
    <p>The <directive>MaxMemFree</directive> directive sets the
    maximum number of free Kbytes that the main allocator is allowed
    to hold without calling <code>free()</code>. When not set, or when set
    maximum number of free Kbytes that every allocator is allowed
    to hold without calling <code>free()</code>. In threaded MPMs, every
    thread has its own allocator. When not set, or when set
    to zero, the threshold will be set to unlimited.</p>
</usage>
</directivesynopsis>
+3 −1
Original line number Diff line number Diff line
@@ -147,6 +147,8 @@ int ap_graceful_shutdown_timeout;
AP_DECLARE_DATA apr_uint32_t ap_max_mem_free;
apr_size_t ap_thread_stacksize;

#define ALLOCATOR_MAX_FREE_DEFAULT (4096*1024)

/* Set defaults for config directives implemented here.  This is
 * called from core's pre-config hook, so MPMs which need to override
 * one of these should run their pre-config hook after that of core.
@@ -158,7 +160,7 @@ void mpm_common_pre_config(apr_pool_t *pconf)
    apr_cpystrn(ap_coredump_dir, ap_server_root, sizeof(ap_coredump_dir));
    ap_coredumpdir_configured = 0;
    ap_graceful_shutdown_timeout = 0; /* unlimited */
    ap_max_mem_free = APR_ALLOCATOR_MAX_FREE_UNLIMITED;
    ap_max_mem_free = ALLOCATOR_MAX_FREE_DEFAULT;
    ap_thread_stacksize = 0; /* use system default */
}