« Previous | Next » 

Revision cf52737f

Parent 4803d050
Child dacd0965

Added by Pierce Lopez about 6 years ago

logging: simplify buffer sizing

no need to try to optimize allocations by rounding up to a power of two
- malloc implementations already do that internally if appropriate (up to a certain size)
- malloc implementations usually include metadata just before or after the allocation,
which this logic does not take into account, and thus likely rounds up to the next size

avoid double call to vsnprintf() in the very common case that the buffer is already sufficient


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences