Skip to content

Commit

Permalink
Revert "Unstubify RAM check in posix evn"
Browse files Browse the repository at this point in the history
This reverts commit 77d949b.

Returning the actual amount of RAM may cause test_start_cache_huge_device to
fail

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
  • Loading branch information
mmichal10 committed Sep 12, 2024
1 parent 297f1cb commit 60271eb
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions env/posix/ocf_env.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 60271eb

Please sign in to comment.