media/libvorbis/lib/misc.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
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-2009 *
michael@0 9 * by the Xiph.Org Foundation http://www.xiph.org/ *
michael@0 10 * *
michael@0 11 ********************************************************************
michael@0 12
michael@0 13 function: miscellaneous prototypes
michael@0 14 last mod: $Id: misc.h 16227 2009-07-08 06:58:46Z xiphmont $
michael@0 15
michael@0 16 ********************************************************************/
michael@0 17
michael@0 18 #ifndef _V_RANDOM_H_
michael@0 19 #define _V_RANDOM_H_
michael@0 20 #include "vorbis/codec.h"
michael@0 21
michael@0 22 extern void *_vorbis_block_alloc(vorbis_block *vb,long bytes);
michael@0 23 extern void _vorbis_block_ripcord(vorbis_block *vb);
michael@0 24
michael@0 25 #ifdef ANALYSIS
michael@0 26 extern int analysis_noisy;
michael@0 27 extern void _analysis_output(char *base,int i,float *v,int n,int bark,int dB,
michael@0 28 ogg_int64_t off);
michael@0 29 extern void _analysis_output_always(char *base,int i,float *v,int n,int bark,int dB,
michael@0 30 ogg_int64_t off);
michael@0 31 #endif
michael@0 32
michael@0 33 #ifdef DEBUG_MALLOC
michael@0 34
michael@0 35 #define _VDBG_GRAPHFILE "malloc.m"
michael@0 36 #undef _VDBG_GRAPHFILE
michael@0 37 extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line);
michael@0 38 extern void _VDBG_free(void *ptr,char *file,long line);
michael@0 39
michael@0 40 #ifndef MISC_C
michael@0 41 #undef _ogg_malloc
michael@0 42 #undef _ogg_calloc
michael@0 43 #undef _ogg_realloc
michael@0 44 #undef _ogg_free
michael@0 45
michael@0 46 #define _ogg_malloc(x) _VDBG_malloc(NULL,(x),__FILE__,__LINE__)
michael@0 47 #define _ogg_calloc(x,y) _VDBG_malloc(NULL,(x)*(y),__FILE__,__LINE__)
michael@0 48 #define _ogg_realloc(x,y) _VDBG_malloc((x),(y),__FILE__,__LINE__)
michael@0 49 #define _ogg_free(x) _VDBG_free((x),__FILE__,__LINE__)
michael@0 50 #endif
michael@0 51 #endif
michael@0 52
michael@0 53 #endif
michael@0 54
michael@0 55
michael@0 56
michael@0 57

mercurial