media/libogg/src/ogg_alloc.c
author Gregory Szorc <gps@mozilla.com>
Tue, 24 Feb 2015 15:16:54 -0800
changeset 245746 6d143a910f5ecf67d9dec302087aa20777ec6772
parent 172785 54c0440b476fd741f2b075ffe2633f145a8780a0
permissions -rw-r--r--
Bug 1132771 - Add Files to moz.build with ability to define Bugzilla component The Files sub-context allows us to attach metadata to files based on pattern matching rules. Patterns are matched against files in a last-write-wins fashion. The sub-context defines the BUG_COMPONENT variable, which is a 2-tuple (actually a named tuple) defining the Bugzilla product and component for files. There are no consumers yet. But an eventual use case will be to suggest a bug component for a patch/commit. Another will be to automatically suggest a bug component for a failing test.

/********************************************************************
 *                                                                  *
 * 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;
}