Skip to content

Conversation

@giulianobelinassi
Copy link
Collaborator

Implement Free_Ram to check how much RAM we have left.

@giulianobelinassi
Copy link
Collaborator Author

This thing is broken. Please don't review it until I say it is fixed.

Copy link
Contributor

@OmniBlade OmniBlade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a comment that you might want to look at using the sysctl function for checking the memory as it is available on macOS, *BSD and Linux. Also, I think macOS defines the unix macros which might be tripping you up?

@giulianobelinassi
Copy link
Collaborator Author

Just a comment that you might want to look at using the sysctl function for checking the memory as it is available on macOS, *BSD and Linux. Also, I think macOS defines the unix macros which might be tripping you up?

The reason why macOS fails is because in some docs from apple it said that I must include proc.h and then call os_proc_available_memory to get the amount of available memory. But the compiler can't find it on the CI.

What is broken there is the bsearch'ing for the maximum allocable memory size on the case that no known platform is found.

Signed-off-by: Giuliano Belinassi <gbelinassi@suse.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants