Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: celt/stack_alloc.h

Issue 28553003: Updating Opus to a pre-release of 1.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/opus
Patch Set: Removing failing file Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « celt/rate.c ('k') | celt/tests/test_unit_cwrs32.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (C) 2002-2003 Jean-Marc Valin 1 /* Copyright (C) 2002-2003 Jean-Marc Valin
2 Copyright (C) 2007-2009 Xiph.Org Foundation */ 2 Copyright (C) 2007-2009 Xiph.Org Foundation */
3 /** 3 /**
4 @file stack_alloc.h 4 @file stack_alloc.h
5 @brief Temporary memory allocation on stack 5 @brief Temporary memory allocation on stack
6 */ 6 */
7 /* 7 /*
8 Redistribution and use in source and binary forms, with or without 8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions 9 modification, are permitted provided that the following conditions
10 are met: 10 are met:
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 #endif /* ENABLE_VALGRIND */ 140 #endif /* ENABLE_VALGRIND */
141 141
142 #include "os_support.h" 142 #include "os_support.h"
143 #define VARDECL(type, var) type *var 143 #define VARDECL(type, var) type *var
144 #define ALLOC(var, size, type) var = PUSH(global_stack, size, type) 144 #define ALLOC(var, size, type) var = PUSH(global_stack, size, type)
145 #define SAVE_STACK char *_saved_stack = global_stack; 145 #define SAVE_STACK char *_saved_stack = global_stack;
146 146
147 #endif /* VAR_ARRAYS */ 147 #endif /* VAR_ARRAYS */
148 148
149
150 #ifdef ENABLE_VALGRIND
151
152 #include <valgrind/memcheck.h>
153 #define OPUS_CHECK_ARRAY(ptr, len) VALGRIND_CHECK_MEM_IS_DEFINED(ptr, len*sizeof (*ptr))
154 #define OPUS_CHECK_VALUE(value) VALGRIND_CHECK_VALUE_IS_DEFINED(value)
155 #define OPUS_CHECK_ARRAY_COND(ptr, len) VALGRIND_CHECK_MEM_IS_DEFINED(ptr, len*s izeof(*ptr))
156 #define OPUS_CHECK_VALUE_COND(value) VALGRIND_CHECK_VALUE_IS_DEFINED(value)
157 #define OPUS_PRINT_INT(value) do {fprintf(stderr, #value " = %d at %s:%d\n", val ue, __FILE__, __LINE__);}while(0)
158 #define OPUS_FPRINTF fprintf
159
160 #else
161
162 static inline int _opus_false(void) {return 0;}
163 #define OPUS_CHECK_ARRAY(ptr, len) _opus_false()
164 #define OPUS_CHECK_VALUE(value) _opus_false()
165 #define OPUS_PRINT_INT(value) do{}while(0)
166 #define OPUS_FPRINTF (void)
167
168 #endif
169
170
149 #endif /* STACK_ALLOC_H */ 171 #endif /* STACK_ALLOC_H */
OLDNEW
« no previous file with comments | « celt/rate.c ('k') | celt/tests/test_unit_cwrs32.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698