/*
* Recommended alloc parameters for "small" contexts that are never expected
* to contain much data (for example, a context to contain a query plan).
*/
#define ALLOCSET_SMALL_MINSIZE 0
#define ALLOCSET_SMALL_INITSIZE (1 * 1024)
#define ALLOCSET_SMALL_MAXSIZE (8 * 1024)
#define ALLOCSET_SMALL_SIZES \
ALLOCSET_SMALL_MINSIZE, ALLOCSET_SMALL_INITSIZE, ALLOCSET_SMALL_MAXSIZE
I don't understand last marco, I use
printf("%d", ALLOCSET_SMALL_SIZES);
then warning:
warning: too many arguments for format [-Wformat-extra-args]
and also return 0.
similar post I found: #define directive with multiple replacements?
Update: Jumped around source code, got it.
function like
foo(size_t,size_t,size_t)
can just use
foo(ALLOCSET_DEFAULT_SIZES)