X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Freadconf.c;h=a5482f72dd1f193d2fdb90cd2e67dad081750cca;hb=fc2ba7b9fae5992dd76f721f283714a6d2ea137d;hp=d13d051420cd0161c149bd38c6b061a7995f73cf;hpb=14ca5d2ac6c3536fe189435269a302ef14e972cf;p=exim.git diff --git a/src/src/readconf.c b/src/src/readconf.c index d13d05142..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 @@ -3341,6 +3341,19 @@ if (f.trusted_config && Ustrcmp(filename, US"/dev/null")) } } +/* 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); + } + /* Process the main configuration settings. They all begin with a lower case letter. If we see something starting with an upper case letter, it is taken as a macro definition. */