On Mon, 2017-03-27 at 16:55 +0300, Ivan Zhakov wrote: > > + > > +/** > > + * Return the aligned (round up) size that an allocator would use for > > + * the given size. > > + * @param size The size to align > > + * @return The aligned size (or zero on apr_size_t overflow) > > + */ > > +APR_DECLARE(apr_size_t) apr_allocator_align(apr_size_t size); > What is the purpose of this API? Currently caller may use > apr_memnode_t.endp to find actually allocated memory size. > > Anyway I think it maybe worth to add apr_allocator_t argument to > apr_allocator_align() function even currently allocation alignment is > the same for all allocators.
+1. If this is going anywhere as an API, it seems like a no-brainer. -- Nick Kew