X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Freadconf.c;h=a5482f72dd1f193d2fdb90cd2e67dad081750cca;hb=6d95688d6a272297a6a47f2fd2695cc8e5b8b730;hp=6ed2ea409dad3cb86546f1ff5b37cbb2725f4ba2;hpb=6d5f5cafb4c507abe36434bf7695573284eb8761;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/readconf.c b/src/src/readconf.c index 6ed2ea409..a5482f72d 100644 --- a/src/src/readconf.c +++ b/src/src/readconf.c @@ -306,7 +306,7 @@ static optionlist optionlist_config[] = { { "smtp_ratelimit_hosts", opt_stringptr, &smtp_ratelimit_hosts }, { "smtp_ratelimit_mail", opt_stringptr, &smtp_ratelimit_mail }, { "smtp_ratelimit_rcpt", opt_stringptr, &smtp_ratelimit_rcpt }, - { "smtp_receive_timeout", opt_func, &fn_smtp_receive_timeout }, + { "smtp_receive_timeout", opt_func, (void *) &fn_smtp_receive_timeout }, { "smtp_reserve_hosts", opt_stringptr, &smtp_reserve_hosts }, { "smtp_return_error_details",opt_bool, &smtp_return_error_details }, #ifdef SUPPORT_I18N @@ -3326,6 +3326,19 @@ if (f.trusted_config && Ustrcmp(filename, US"/dev/null")) log_write(0, LOG_MAIN|LOG_PANIC_DIE, "Exim configuration file %s has the " "wrong owner, group, or mode", big_buffer); + + /* Do a dummy store-allocation of a size related to the (toplevel) file size. + This assumes we will need this much storage to handle all the allocations + during startup; it won't help when .include is being used. When it does, it + will cut down on the number of store blocks (and malloc calls, and sbrk + syscalls). It also assume we're on the relevant pool. */ + + if (statbuf.st_size > 8192) + { + rmark r = store_mark(); + void * dummy = store_get((int)statbuf.st_size, FALSE); + store_reset(r); + } } /* Do a dummy store-allocation of a size related to the (toplevel) file size.