feature request: aligned_realloc

Daniel Micay danielmicay at gmail.com
Wed Jan 21 21:31:48 PST 2015


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://jemalloc.net/mailman/jemalloc-discuss/attachments/20150122/a861180a/attachment.sig>


More information about the jemalloc-discuss mailing list