Skip to content

Memory-usage data on platforms without /proc #9

@dmacks

Description

@dmacks

OS X doesn't have the /proc pseudo-filesystem, so running GDSIIConvert logs:

12/15/19::12:38:01: Mem[0] before,during,after={0,0,0},delta=0
12/15/19::12:38:01: Mem[1] before,during,after={0,0,0},delta=0
12/15/19::12:38:01: Mem[2] before,during,after={0,0,0},delta=0
12/15/19::12:38:01: Mem[3] before,during,after={0,0,0},delta=0
12/15/19::12:38:01: Mem[4] before,during,after={0,0,0},delta=0
12/15/19::12:38:01: Mem[5] before,during,after={0,0,0},delta=0
12/15/19::12:38:01: Mem[6] before,during,after={0,0,0},delta=0

I assume Windows has a similar result. It would be better to log that the data wasn't available (absence of data != actual data value of zero). GetMemoryUsage() is prototyped to return an unsigned int, but hardcoded to return 0 and that value is ignored. If it returned a value that signifies success vs failure, then the caller (main()) can call ::Log with a different string to indicate this situation.

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