Skip to content

RAM used by C code? #2

@tdhock

Description

@tdhock

Hey @tpq interesting package! It looks like you use gc() to track memory usage, right? I like the portability of your approach (I see from the CRAN check page https://cran.r-project.org/web/checks/check_results_peakRAM.html that it works on all systems).

But because you use gc() that means that any code that calls C and allocates memory outside of the R garbage collector will not be counted, right?

@analyticalmonk did something similar in https://github.com/analyticalmonk/Rperform but we ended up using the ps command line program to measure memory https://github.com/analyticalmonk/Rperform/blob/master/exec/rss.sh so we could count all memory that the R process is using (even outside of the garbage collector). one issue with this approach is that it only works on systems with the ps program.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions