media/libogg/src/ogg_alloc.c

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/libogg/src/ogg_alloc.c	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,31 @@
     1.4 +/********************************************************************
     1.5 + *                                                                  *
     1.6 + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
     1.7 + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
     1.8 + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
     1.9 + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
    1.10 + *                                                                  *
    1.11 + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
    1.12 + * by the Xiph.Org Foundation http://www.xiph.org/                  *
    1.13 + *                                                                  *
    1.14 + *********************************************************************/
    1.15 +
    1.16 +#include <stdlib.h>
    1.17 +#include "ogg/os_types.h"
    1.18 +
    1.19 +ogg_malloc_function_type *ogg_malloc_func = malloc;
    1.20 +ogg_calloc_function_type *ogg_calloc_func = calloc;
    1.21 +ogg_realloc_function_type *ogg_realloc_func = realloc;
    1.22 +ogg_free_function_type *ogg_free_func = free;
    1.23 +
    1.24 +void
    1.25 +ogg_set_mem_functions(ogg_malloc_function_type *malloc_func,
    1.26 +                      ogg_calloc_function_type *calloc_func,
    1.27 +                      ogg_realloc_function_type *realloc_func,
    1.28 +                      ogg_free_function_type *free_func)
    1.29 +{
    1.30 +  ogg_malloc_func = malloc_func;
    1.31 +  ogg_calloc_func = calloc_func;
    1.32 +  ogg_realloc_func = realloc_func;
    1.33 +  ogg_free_func = free_func;
    1.34 +}

mercurial