[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

revision 685, Wed Nov 27 21:20:33 2002 UTC revision 742, Sat Dec 28 13:53:08 2002 UTC
# Line 4  Line 4 
4   *  - Aligned memory allocator -   *  - Aligned memory allocator -
5   *   *
6   *  Copyright(C) 2002 Michael Militzer <isibaar@xvid.org>   *  Copyright(C) 2002 Michael Militzer <isibaar@xvid.org>
7   *               2002 Edouard Gomez   *               2002 Edouard Gomez <ed.gomez@free.fr>
8   *   *
9   *  This file is part of XviD, a free MPEG-4 video encoder/decoder   *  This file is part of XviD, a free MPEG-4 video encoder/decoder
10   *   *
# Line 51  Line 51 
51   *  exception also makes it possible to release a modified version which   *  exception also makes it possible to release a modified version which
52   *  carries forward this exception.   *  carries forward this exception.
53   *   *
54   * $Id: mem_align.c,v 1.12 2002-11-27 21:20:33 edgomez Exp $   * $Id: mem_align.c,v 1.14 2002-12-28 13:53:08 edgomez Exp $
55   *   *
56   ****************************************************************************/   ****************************************************************************/
57    
# Line 88  Line 88 
88                  if ((mem_ptr = (uint8_t *) malloc(size + 1)) != NULL) {                  if ((mem_ptr = (uint8_t *) malloc(size + 1)) != NULL) {
89    
90                          /* Store (mem_ptr - "real allocated memory") in *(mem_ptr-1) */                          /* Store (mem_ptr - "real allocated memory") in *(mem_ptr-1) */
91                          *mem_ptr = 0;                          *mem_ptr = 1;
92    
93                          /* Return the mem_ptr pointer */                          /* Return the mem_ptr pointer */
94                          return (void *)(mem_ptr+1);                          return (void *)(mem_ptr+1);

Legend:
Removed from v.685  
changed lines
  Added in v.742

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