Skip to content

Commit

Permalink
chore: add ref info
Browse files Browse the repository at this point in the history
  • Loading branch information
flowerinthenight committed May 28, 2024
1 parent 73983da commit 151d97f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions memx.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

// 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
func GetMemoryUsage() (uint64, error) {
f, err := os.Open(fmt.Sprintf("/proc/%d/smaps", os.Getpid()))
if err != nil {
Expand Down

0 comments on commit 151d97f

Please sign in to comment.