My compiler (GCC) is giving me the warning:
warning: implicit declaration of function
Please help me understand why is it coming
If you have the correct headers defined & are using a non GlibC
library (such as Musl C) gcc
will also throw error: implicit declaration of function
when GNU extensions such as malloc_trim
are encountered.
The solution is to wrap the extension & the header:
#if defined (__GLIBC__)
malloc_trim(0);
#endif