From 60271ebb72504f7ac8d2dfcdf995096a746350ed Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Thu, 12 Sep 2024 12:16:36 +0200 Subject: [PATCH] Revert "Unstubify RAM check in posix evn" This reverts commit 77d949bdcc17c559bbfbdf8e39eb74fd929d87e6. Returning the actual amount of RAM may cause test_start_cache_huge_device to fail Signed-off-by: Michal Mielewczyk --- env/posix/ocf_env.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/env/posix/ocf_env.h b/env/posix/ocf_env.h index c82cf643..9220d1ea 100644 --- a/env/posix/ocf_env.h +++ b/env/posix/ocf_env.h @@ -195,18 +195,9 @@ static inline void env_secure_free(const void *ptr, size_t size) } } -#include - static inline uint64_t env_get_free_memory(void) { - struct sysinfo info; - int ret; - - ret = sysinfo(&info); - if (ret != 0) - return 0; - - return (uint64_t)info.totalram * info.mem_unit; + return (uint64_t)(-1); } /* ALLOCATOR */