[XviD-devel] mem_align.c bug

pikatu xvid-devel@xvid.org
Thu, 12 Dec 2002 10:13:17 +0000


You still have a bug there since in the case of no alignment the free routine 
will fail.

	(uint8_t *) mem_ptr - *((uint8_t *) mem_ptr - 1)

is the same as 

	(uint8_t *) mem_ptr
	
which is not the pointer to the allocated memory.


By the way, why not set the default alignment to something more reasonable 
than 1 ? 

Ilan