Ben Laurie wrote: >[EMAIL PROTECTED] wrote: > >>brianp 02/01/06 00:01:34 >> >> Modified: modules/loggers mod_log_config.c >> Log: >> Bypass a strdup and an 8KB local variable in the common case where >> the logger is using the default time format >> > >Does that really stop the stack space from being allocated? It seems >unlikely to me (I haven't checked). >
You're right. I just checked, and it didn't stop the space from being allocated. I'll move that branch of the code to separate function so that it really works. (The alternative would be to alloc that buffer from a pool, allocating 8KB from a pool would cause its own set of problems, because a typical pool block doesn't have enough free space to handle an alloc that large, so we'd often be allocating a new, odd-sized block.) --Brian