Skip to content

Commit

Permalink
Merge pull request #823 from mmichal10/fix-ram-check
Browse files Browse the repository at this point in the history
Revert "Unstubify RAM check in posix evn"
  • Loading branch information
robertbaldyga committed Sep 12, 2024
2 parents 297f1cb + 60271eb commit d2fcd27
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 d2fcd27

Please sign in to comment.