feature request: aligned_realloc

Jeff Hammond jeff.science at gmail.com
Wed Jan 21 22:02:18 PST 2015

On Wed, Jan 21, 2015 at 11:31 PM, Daniel Micay <danielmicay at gmail.com> wrote:
> On 22/01/15 12:21 AM, Jeff Hammond wrote:
>> I don't see aligned_realloc anywhere in jemalloc.  I wonder if this is
>> a feature you would be willing to support?  A colleague of mine was
>> interested in it recently, and it wasn't obvious how one would do an
>> efficient implementation on top of the standard API calls.
>> There are other implementations of this already.  While I am nothing
>> resembling a fan of Windows, I would argue that a function signature
>> compatible with MSVC is desirable.
>> Microsoft: https://msdn.microsoft.com/en-us/library/y69db7sx.aspx
>> Boost:SIMD (not yet part of Boost):
>> http://nt2.metascale.fr/doc/html/boost/simd/aligned_realloc.html
>> MRPT: http://reference.mrpt.org/svn/group__mrpt__memory.html#gaa0dd8ec272a9f40a191342057c185bd9
>> Eigen: http://docs.ros.org/hydro/api/win_eigen/html/namespaceEigen_1_1internal.html#a2a45fbd9d5eaa2c84e561fceaf39d139
>> OpenUH: http://www2.cs.uh.edu/~estrabd/OpenUH/r593/html-libopenmp/d4/d8c/a00035.html
>> Is this a reasonable request?  I don't feel qualified to implement
>> this, otherwise I really would try to do it myself and contribute the
>> patch.
>> Thanks,
>> Jeff
> It's provided by rallocx. The Windows family of functions is different
> because you can't mix them with the regular API. You could also use the
> in-place realloc function (xallocx) and copy on your own if it fails,
> which can be more flexible.

Thanks!  It was not obvious to me that such a function name would
contain neither "align" nor "realloc".



Jeff Hammond
jeff.science at gmail.com

More information about the jemalloc-discuss mailing list