Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Free ram #793

Open
wants to merge 1 commit into
base: vanilla
Choose a base branch
from

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.

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