media/libogg/src/ogg_alloc.c

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 /********************************************************************
michael@0 2 * *
michael@0 3 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
michael@0 4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
michael@0 5 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
michael@0 6 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
michael@0 7 * *
michael@0 8 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
michael@0 9 * by the Xiph.Org Foundation http://www.xiph.org/ *
michael@0 10 * *
michael@0 11 *********************************************************************/
michael@0 12
michael@0 13 #include <stdlib.h>
michael@0 14 #include "ogg/os_types.h"
michael@0 15
michael@0 16 ogg_malloc_function_type *ogg_malloc_func = malloc;
michael@0 17 ogg_calloc_function_type *ogg_calloc_func = calloc;
michael@0 18 ogg_realloc_function_type *ogg_realloc_func = realloc;
michael@0 19 ogg_free_function_type *ogg_free_func = free;
michael@0 20
michael@0 21 void
michael@0 22 ogg_set_mem_functions(ogg_malloc_function_type *malloc_func,
michael@0 23 ogg_calloc_function_type *calloc_func,
michael@0 24 ogg_realloc_function_type *realloc_func,
michael@0 25 ogg_free_function_type *free_func)
michael@0 26 {
michael@0 27 ogg_malloc_func = malloc_func;
michael@0 28 ogg_calloc_func = calloc_func;
michael@0 29 ogg_realloc_func = realloc_func;
michael@0 30 ogg_free_func = free_func;
michael@0 31 }

mercurial