[cvs] / xvidcore / src / utils / mem_align.c Repository:
ViewVC logotype

Diff of /xvidcore/src/utils/mem_align.c

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

revision 1.9, Thu Sep 5 21:32:30 2002 UTC revision 1.15, Sat Feb 15 15:22:19 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  
  *               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     ****************************************************************************/
30    /*****************************************************************************
31     *
32     *  History
33     *
34     *  - Thu Jun 13 23:50:07 2002 Added legal header
35     *
36   * $Id$   * $Id$
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++;

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.15

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