Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#1915 - archstats - long int overflow on amount of Swap

Attached to Project: Arch Linux
Opened by Jeremy (loserMcloser) - Monday, 20 December 2004, 05:48 GMT
Last edited by Eric Johnson (eric) - Sunday, 02 January 2005, 21:05 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Eric Johnson (eric)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

"free -b" reports my amount of swap as 2155012096 bytes.

"archstats -d" reports my amount of swap as -2139955200, which is exactly the number you get if you try to store 2155012096 as a signed 32-bit integer.

archstats should use an unsigned long int to store the size of swap, which would at least support up to 4 GB of swap.
This task depends upon

Closed by  Eric Johnson (eric)
Sunday, 02 January 2005, 21:06 GMT
Reason for closing:  Fixed
Additional comments about closing:  changed from long to double to handle higher values for mem/swap
Comment by Dale Blount (dale) - Monday, 20 December 2004, 20:55 GMT
Hrm, I have boxes myself with more than 4gb of ram or swap... maybe unsigned int isn't even enough... Eric?
Comment by Jeremy (loserMcloser) - Monday, 20 December 2004, 23:46 GMT
Yeah, in a couple years 4gb will probably even be the norm ;)

I wouldn't think precision would matter too much in this situation, perhaps a double would be best.

Loading...