I was reading the jemalloc's realloc function and noticed that all the non-static functions(at least the ones I've seen) in jemalloc is wrapped with JEMALLOC_P macro and JEMALLOC_P is:
#define JEMALLOC_P(s) s
Why would they need such a thing?
I was reading the jemalloc's realloc function and noticed that all the non-static functions(at least the ones I've seen) in jemalloc is wrapped with JEMALLOC_P macro and JEMALLOC_P is:
#define JEMALLOC_P(s) s
Why would they need such a thing?
You should look at the context that line is in. The code is actually:
#ifndef JEMALLOC_P
# define JEMALLOC_P(s) s
#endif
This means that, prior to including the header file, you could have provided your version of the JEMALLOC_P()
. If you haven't that is the default.