[CELT-dev] CELT grabbing 100KB of memory right off the top

Ross Bencina rossb-lists at audiomulch.com
Mon Apr 18 22:25:06 PDT 2011

Gregory Maxwell wrote:
> The expected procedure is that anyone building on an embedded system
> will need to build a setup header file for their system.  README.Win32
> recommend setting this in config.h and then -DHAVE_CONFIG_H in the
> build options, though it appears that we should make the instructions
> more prominent.

Where exactly is this README.Win32?

I don't see it in the celt-0.11.1 tarball I just downloaded.

In the case of "inline" and "restrict" may I humbly suggest that these be 
handled using a portable automatic mechanism rather than requiring config.h?

C99 provides __STDC_VERSION__ for this purpose. See for example:

It would be great if all files that used "restrict" or "inline" had 
something like the following (or included a file for it):

#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )
#define inline
#define restrict

Personally I do prefer the use of CELT_INLINE, CELT_RESTRICT because 
"inline" and "restrict" are not reserved words in other C dialects. To me 
the distinction is between (1) "Writing portable code with optional support 
for C99 extensions" or (2) "providing hacks to make C99 code work with other 

Another (even better) approach would be to provide separate macros for 
CELT_RESTRICT_FUNC  and CELT_RESTRICT_VAR since this could allow use of MSVC 
__restrict and __declspec(restrict):

Something that is not possible at all right now.


More information about the celt-dev mailing list