diff --git a/openrtx/src/memory_profiling.cpp b/openrtx/src/memory_profiling.cpp index 2b0609e3..973a6711 100644 --- a/openrtx/src/memory_profiling.cpp +++ b/openrtx/src/memory_profiling.cpp @@ -18,9 +18,12 @@ * along with this program; if not, see * ***************************************************************************/ -#include #include +#ifdef _MIOSIX + +#include + /* * Provide a C-callable wrapper for the corresponding miosix functions. */ @@ -60,3 +63,42 @@ unsigned int getCurrentFreeHeap() //return miosix::MemoryProfiling::getCurrentFreeHeap(); return getAbsoluteFreeHeap(); } + +#else + +/* + * No memory profiling is possible on x86/64 machines, thus all the functions + * return 0. + */ + +unsigned int getStackSize() +{ + return 0; +} + +unsigned int getAbsoluteFreeStack() +{ + return 0; +} + +unsigned int getCurrentFreeStack() +{ + return 0; +} + +unsigned int getHeapSize() +{ + return 0; +} + +unsigned int getAbsoluteFreeHeap() +{ + return 0; +} + +unsigned int getCurrentFreeHeap() +{ + return 0; +} + +#endif