[FFmpeg-devel] [PATCH 1/3] avutil/mem: Fix *realloc() alignment with memalign hack

Michael Niedermayer michael at niedermayer.cc
Mon Nov 21 20:30:08 EET 2016

On Mon, Nov 21, 2016 at 04:34:54PM +0100, wm4 wrote:
> On Mon, 21 Nov 2016 16:18:56 +0100
> Michael Niedermayer <michael at niedermayer.cc> wrote:
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> >  libavutil/mem.c | 44 ++++++++++++++++++++++++++++++++------------
> >  1 file changed, 32 insertions(+), 12 deletions(-)
> > 
> "Fix" is not a good description. Was it broken? What was broken?

there was a "FIXME" in there about the realloc alignment
and as the heap limit i wanted to implement needed very similar changes
i fixed that. I did remember that at some point in the past we wanted to
have this codepath align correctly.

Maybe the comment mislead me
still, this code could come in handy for debuging and tracing things
as it allows debug code to access the allocated size of heap
allocations easily
also as its already written, someone might want to check if it has any
speed effect to have misaligned output from realloc()

> Also, I thought the memalign hack was generally not needed anymore.
> Which platforms still need it?

i dont know, iam not a user of an affected platform

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161121/4675e781/attachment.sig>

More information about the ffmpeg-devel mailing list