« Previous | Next » 

Revision cf52737f

IDcf52737fdfe016d74d1bb25cca61be151e474365
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

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences