Skip Menu |

This queue is for tickets about the Sys-MemInfo CPAN distribution.

Report information
The Basics
Id: 97059
Status: open
Priority: 0/
Queue: Sys-MemInfo

People
Owner: Nobody in particular
Requestors: rleach [...] genomics.princeton.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: wrong amount of memory returned
Date: Tue, 8 Jul 2014 11:42:48 -0400
To: bug-Sys-MemInfo [...] rt.cpan.org
From: Robert William Leach <rleach [...] genomics.princeton.edu>
Hi, Was looking for a module to determine the total amount of system memory and tried out Sys::MemInfo. However, I noted that it says I have 4 gigs when I have 16: perl -e 'use Sys::MemInfo qw(totalmem);print "total memory: ".(&totalmem / 1024 / 1024 / 1024)."\n";' total memory: 3.99408721923828 system_profiler | grep " Memory:" Memory: 16 GB I thought I would report it as a bug. Best, Rob Robert William Leach 133A Carl C. Icahn Lab Lewis-Sigler Institute for Integrative Genomics Princeton University Princeton, NJ 08544
On 2014-07-08 11:43:05, rleach@genomics.princeton.edu wrote: Show quoted text
> Hi, > > Was looking for a module to determine the total amount of system > memory and tried out Sys::MemInfo. However, I noted that it says I > have 4 gigs when I have 16: > > perl -e 'use Sys::MemInfo qw(totalmem);print "total memory: > ".(&totalmem / 1024 / 1024 / 1024)."\n";' > total memory: 3.99408721923828 > > system_profiler | grep " Memory:" > Memory: 16 GB >
I see the same problem on a macbook: $ perl -e 'use Sys::MemInfo qw(totalmem);print "total memory: ".(&totalmem / 1024 / 1024 / 1024)."\n";' total memory: 3.77576065063477 $ perl -E 'say `sysctl -n hw.memsize`/1024**3' 16