Revert "Unstubify RAM check in posix evn"

This reverts commit 77d949bdcc.

Returning the actual amount of RAM may cause test_start_cache_huge_device to
fail

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
Michal Mielewczyk 2024-09-12 12:16:36 +02:00
parent 297f1cb8b0
commit 60271ebb72

11
env/posix/ocf_env.h vendored
View File

@ -195,18 +195,9 @@ static inline void env_secure_free(const void *ptr, size_t size)
} }
} }
#include <sys/sysinfo.h>
static inline uint64_t env_get_free_memory(void) static inline uint64_t env_get_free_memory(void)
{ {
struct sysinfo info; return (uint64_t)(-1);
int ret;
ret = sysinfo(&info);
if (ret != 0)
return 0;
return (uint64_t)info.totalram * info.mem_unit;
} }
/* ALLOCATOR */ /* ALLOCATOR */