[svn] / branches / dev-api-4 / xvidcore / src / utils / mem_align.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/src/utils/mem_align.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/xvidcore/src/utils/mem_align.c revision 603, Sat Oct 19 11:41:12 2002 UTC branches/dev-api-4/xvidcore/src/utils/mem_align.c revision 998, Sun Apr 27 20:50:54 2003 UTC
# Line 3  Line 3 
3   *  XVID MPEG-4 VIDEO CODEC   *  XVID MPEG-4 VIDEO CODEC
4   *  - Aligned memory allocator -   *  - Aligned memory allocator -
5   *   *
  *  Copyright(C) 2002 Michael Militzer <isibaar@xvid.org>  
  *               2002 Edouard Gomez  
  *  
6   *  This program is an implementation of a part of one or more MPEG-4   *  This program is an implementation of a part of one or more MPEG-4
7   *  Video tools as specified in ISO/IEC 14496-2 standard.  Those intending   *  Video tools as specified in ISO/IEC 14496-2 standard.  Those intending
8   *  to use this software module in hardware or software products are   *  to use this software module in hardware or software products are
# Line 29  Line 26 
26   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
27   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
28   *   *
29   * $Id: mem_align.c,v 1.10 2002-10-19 11:41:11 edgomez Exp $   ****************************************************************************/
30    /*****************************************************************************
31     *
32     *  History
33     *
34     *  - Thu Jun 13 23:50:07 2002 Added legal header
35     *
36     *  $Id: mem_align.c,v 1.15.2.1 2003-04-27 20:50:54 edgomez Exp $
37   *   *
38   ****************************************************************************/   ****************************************************************************/
39    
40    
41  #include <stdlib.h>  #include <stdlib.h>
42  #include <stdio.h>  #include <stdio.h>
43  #include "mem_align.h"  #include "mem_align.h"
# Line 66  Line 71 
71                  if ((mem_ptr = (uint8_t *) malloc(size + 1)) != NULL) {                  if ((mem_ptr = (uint8_t *) malloc(size + 1)) != NULL) {
72    
73                          /* Store (mem_ptr - "real allocated memory") in *(mem_ptr-1) */                          /* Store (mem_ptr - "real allocated memory") in *(mem_ptr-1) */
74                          *mem_ptr = 0;                          *mem_ptr = 1;
75    
76                          /* Return the mem_ptr pointer */                          /* Return the mem_ptr pointer */
77                          return (void *) mem_ptr++;                          return (void *)(mem_ptr+1);
78    
79                  }                  }
80    

Legend:
Removed from v.603  
changed lines
  Added in v.998

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4