r.terraflow: remove print "Free Memory" to stats file#1306
Merged
nilason merged 1 commit intoOSGeo:masterfrom Feb 5, 2021
Merged
r.terraflow: remove print "Free Memory" to stats file#1306nilason merged 1 commit intoOSGeo:masterfrom
nilason merged 1 commit intoOSGeo:masterfrom
Conversation
metzm
approved these changes
Feb 4, 2021
Contributor
metzm
left a comment
There was a problem hiding this comment.
The changes make sense, please merge.
r.terraflow has been designed for past conditions, was never really portable, and is by now outdated.
Contributor
Author
Thanks, merging! |
Contributor
|
Thanks @nilason ! |
marisn
pushed a commit
to marisn/grass
that referenced
this pull request
Mar 22, 2021
ninsbl
pushed a commit
to ninsbl/grass
that referenced
this pull request
Oct 26, 2022
ninsbl
pushed a commit
to ninsbl/grass
that referenced
this pull request
Feb 17, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generating a statistics file with r.terraflow (e.g.
r.terraflow stats=stats.txt [...]) the first line in the stats file (is supposed to) state the amount of free memory:with the value "-1" given if it failed to calculate the size.
Current implementation is based on
getrlimit(), see: r.terraflow/stats.cpp and the value ofrlimit.rlim_cur.On a 64 bit Mac and probably Linux too (#712 (comment))
rlimit.rlim_cur == RLIM_INFINITYand the calculation fails. I may add that this code is already excluded from__MINGW32__builds.Part of the calculation is based on the deprecated
sbrk(), originally reported with #712.There is a lot of things to address with present code and all it does is printing one line in the stat file.
With this PR I propose to remove this part of the code, as I couldn't come up with a platform independent way to calculate "free memory" (also a vague concept considering virtual memory).
Fixes #712