--- mem_align.c 2002/10/19 11:41:11 1.10 +++ mem_align.c 2003/04/27 20:50:54 1.15.2.1 @@ -3,9 +3,6 @@ * XVID MPEG-4 VIDEO CODEC * - Aligned memory allocator - * - * Copyright(C) 2002 Michael Militzer - * 2002 Edouard Gomez - * * This program is an implementation of a part of one or more MPEG-4 * Video tools as specified in ISO/IEC 14496-2 standard. Those intending * to use this software module in hardware or software products are @@ -29,10 +26,18 @@ * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: mem_align.c,v 1.10 2002/10/19 11:41:11 edgomez Exp $ + ****************************************************************************/ +/***************************************************************************** + * + * History + * + * - Thu Jun 13 23:50:07 2002 Added legal header + * + * $Id: mem_align.c,v 1.15.2.1 2003/04/27 20:50:54 edgomez Exp $ * ****************************************************************************/ + #include #include #include "mem_align.h" @@ -66,10 +71,10 @@ if ((mem_ptr = (uint8_t *) malloc(size + 1)) != NULL) { /* Store (mem_ptr - "real allocated memory") in *(mem_ptr-1) */ - *mem_ptr = 0; + *mem_ptr = 1; /* Return the mem_ptr pointer */ - return (void *) mem_ptr++; + return (void *)(mem_ptr+1); }