I observed a code clone in the following files. In the function 
ap_mpm_set_max_mem_free the variable "value" has to be multiplied by 1024 
before exit while ap_mpm_set_thread_stacksize does not perform this operation. 
I wonder if this is necessary. Hope it helps.

function : ap_mpm_set_max_mem_free @ (file: "httpd-2.4.2/server/mpm_common.c", 
line: 376)~388
    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
    if (err != NULL) {
        return err;
    }

    value = strtol(arg, NULL, 10);
    if (value < 0 || errno == ERANGE)
        return apr_pstrcat(cmd->pool, "Invalid MaxMemFree value: ",
                           arg, NULL);

    ap_max_mem_free = (apr_uint32_t)value * 1024;

    return NULL;

function : ap_mpm_set_thread_stacksize @ (file: 
"httpd-2.4.2/server/mpm_common.c", line: 395)~407
    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
    if (err != NULL) {
        return err;
    }

    value = strtol(arg, NULL, 10);
    if (value < 0 || errno == ERANGE)
        return apr_pstrcat(cmd->pool, "Invalid ThreadStackSize value: ",
                           arg, NULL);

    ap_thread_stacksize = (apr_size_t)value;

    return NULL;

Reply via email to