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:
parent
297f1cb8b0
commit
60271ebb72
11
env/posix/ocf_env.h
vendored
11
env/posix/ocf_env.h
vendored
@ -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)
|
||||
{
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user