0

In NetBSD system I am seeing this issue where top command displays -ve value for resident memory. I checked for memory leaks in code and did not find any. In fact this is the case with shell(sh) process as well [not shown in pic below].

I am curious if a bug in user program can cause this behaviour. If that is true, I wanted to understand how I may reproduce this issue.

Also if there any known bug in NetBSD or GCC library that may cause this problem.

enter image description here

ultimate cause
  • 2,264
  • 4
  • 27
  • 44

1 Answers1

0

top is a relatively poor cousin to all of the native tools for examining process state on NetBSD (despite having been adapted for / ported to NetBSD). I wouldn't be surprised at all if it contained some bugs related to integer conversions (signed/unsigned, overflow, etc.). The original top code isn't of the highest quality in the first place.

Greg A. Woods
  • 2,663
  • 29
  • 26