The pthreads version of vcos_get_free_mem() isn't used anywhere
and causes compiler warnings due to its use of sbrk() without
the relevant #defines.
Ideally it should look at something like /proc/vmstat, but
that's not what it does.
So turn it into a stub function and mark it deprecated. The
VMCS version will carry on working as before.
See issue #316.
#if defined(linux) || defined(_HAVE_SBRK)
-/* not exactly the free memory, but a measure of it */
+/* Returns invalid result, do not use */
VCOS_INLINE_IMPL
-unsigned long vcos_get_free_mem(void) {
- return (unsigned long)sbrk(0);
+unsigned long VCOS_DEPRECATED("returns invalid result") vcos_get_free_mem(void) {
+ return 0;
}
#endif