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

Add mem(laundry) numbers on FreeBSD. #566

Merged
merged 2 commits into from
Aug 11, 2018

Conversation

zyun53
Copy link
Contributor

@zyun53 zyun53 commented Aug 7, 2018

After FreeBSD 11.1, mem number of cached replaced by laundry.

https://reviews.freebsd.org/D8302

And Fix FreeBSD total memory. Like this.

FreeBSD: fix total memory giampaolo/psutil@bd9a58b giampaolo/psutil@bd9a58b

@Lomanic
Copy link
Collaborator

Lomanic commented Aug 7, 2018

Thanks for the fixed way to calculate total memory as in python psutil, but I don't find any trace of laundry in https://github.com/giampaolo/psutil/blob/f4c6b02461cc89a7f9a98a164d346b4dfb72bee0/psutil/arch/freebsd/specific.c, won't it break on previous versions (lower than 11.1) of FreeBSD?

After FreeBSD 11.1, mem number of cached replaced by laundry.

https://reviews.freebsd.org/D8302
@zyun53 zyun53 force-pushed the add_freebsd_mem_laundry branch from 5db3a85 to bd7b2f8 Compare August 8, 2018 11:02
@zyun53
Copy link
Contributor Author

zyun53 commented Aug 8, 2018

psutil not support laundry yet. Regarding the calculation of the total memory, I found it while fixing this problem.

Fix break on previous version. Pass mem test in my FreeBSD 11.0.

@shirou
Copy link
Owner

shirou commented Aug 11, 2018

Thank you so much! I confirmed this cool PR works on my FreeBSD-11 environment. And I agree to add FreeBSD specific laundary to memstat struct, because Linux already has.

And, this PR contains a version check so I think it can run on FreeBSD-10! cool!!

@shirou shirou merged commit 68ff0e2 into shirou:master Aug 11, 2018
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.

3 participants