Skip to content

Commit

Permalink
Update memx.go
Browse files Browse the repository at this point in the history
  • Loading branch information
flowerinthenight committed May 30, 2024
1 parent 923be32 commit e0b933b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions memx.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ import (
"strings"
)

// GetMemoryUsage returns the calling process' internal + shared
// memory usage in kB. Linux-specific as it reads /proc/.
// Ref: https://en.wikipedia.org/wiki/Proportional_set_size
// GetMemoryUsage returns the calling process' internal + shared memory usage in kB.
func GetMemoryUsage() (uint64, error) {
f, err := os.Open(fmt.Sprintf("/proc/%d/smaps", os.Getpid()))
if err != nil {
Expand Down

0 comments on commit e0b933b

Please sign in to comment.