summaryrefslogtreecommitdiffstats
path: root/media/libogg/src/ogg_alloc.c
blob: 4238d7b6104e8e8562a3e440e22a2c6112c9cd96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/********************************************************************
 *                                                                  *
 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
 *                                                                  *
 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
 * by the Xiph.Org Foundation http://www.xiph.org/                  *
 *                                                                  *
 *********************************************************************/

#include <stdlib.h>
#include "ogg/os_types.h"

ogg_malloc_function_type *ogg_malloc_func = malloc;
ogg_calloc_function_type *ogg_calloc_func = calloc;
ogg_realloc_function_type *ogg_realloc_func = realloc;
ogg_free_function_type *ogg_free_func = free;

void
ogg_set_mem_functions(ogg_malloc_function_type *malloc_func,
                      ogg_calloc_function_type *calloc_func,
                      ogg_realloc_function_type *realloc_func,
                      ogg_free_function_type *free_func)
{
  ogg_malloc_func = malloc_func;
  ogg_calloc_func = calloc_func;
  ogg_realloc_func = realloc_func;
  ogg_free_func = free_func;
}