[XviD-devel] problem in mem_align.c
Edouard Gomez
xvid-devel@xvid.org
Tue, 26 Nov 2002 22:51:00 +0100
pikatu (pikatu@012.net.il) wrote:
> It seems to me that the code in mem_align.c is a bit buggy,
> shouldn't it be:
>[...]
The comment is false, that's why you thought it was *mem_ptr = 1;
But as mentionned later, *(aligned pointer -1) stores the offset to the
real malloc block. In the case of no alignment, *(aligned pointer - 1)
is the malloc block so the offset to malloc block is zero.
That's why it is *mem_ptr = 0;
I'll change the comment as it is not clear at all.
--
Edouard Gomez