[Ffmpeg-devel] [PATCH] posix memalign

Daniel Kristjansson danielk
Fri May 13 19:38:01 CEST 2005


On Fri, 2005-05-13 at 12:58 -0400, Rich Felker wrote:
> On Fri, May 13, 2005 at 06:31:27PM +0200, Michael Niedermayer wrote:
> > Hi
> > 
> > On Friday 13 May 2005 15:48, Daniel Kristjansson wrote:
> > > Simple patch that uses posix_memalign instead of plain memalign,
> > > if _XOPEN_SOURCE is greater than or equal to 600.
> > >
> > > Unlike the old memalign() call, the memory allocated by posix_memalign()
> > > can always be freed using free().
> > 
> > on which system does free(memalign()) fail? if none then consider this patch 
> > rejected
> 
> Also posix_memalign does not exist on most systems, and is reportedly
> broken on some systems on which it does exist. This was discussed a
> month or so ago and rejected then too.

Ah, I missed that flame fest.

Don't worry, I'm not that attached to this patch. I was fixing a
different bug and thought this might be the cause, but it turned
out not to be the problem.

I did once have a problem with memalign() 2-3 years ago on Linux,
I'm assuming whatever problem I had then was fixed long ago. Glibc
definately does allow you to free memalign allocated buffers.

-- Daniel





More information about the ffmpeg-devel mailing list