linux_logo icon indicating copy to clipboard operation
linux_logo copied to clipboard

Memory not correct shown

Open ragnar76 opened this issue 5 years ago • 4 comments

Hi there,

i have a raspi 4 with 8 Gig of memory but linuxlogo shows only 4 Gig. grafik

ragnar76 avatar Feb 03 '21 21:02 ragnar76

getting a proper memory size value is one of the more difficult things you can do on Linux.

With the 8GB Pi it's harder as a 32-bit OS can only access more than 4GB with hacks so most of the memory reporting mechanisms aren't going to handle it well.

does /proc/meminfo have proper values? Does the top utility report the proper amount of RAM?

deater avatar Feb 04 '21 21:02 deater

Hi, good morning.

Yes, i know how hard it was to use more than 4gb on a 32-bit system. back in the old days we had to struggle with big and pae kernels but in the raspi... i dont really know how it is managed there.

However, meminfo and top displays (some kind of) the same values grafik

ragnar76 avatar Feb 05 '21 08:02 ragnar76

if you edit libsysinfo-0.3.0/Linux/cpuinfo_arm.c

and change the return value of get_arch_specific_mem_size() to be MEM_USE_MEMINFO instead of 0, do you get a better result?

I'll have to think about changing the default, it's probably OK I just worry it will break some other architecture. I forget if sysinfo is the default for a specific reason or not.

deater avatar Feb 08 '21 21:02 deater

Hello,

With version 5.11-9 (Linux Mint packages), I got this : image

I didn't know i had so much RAM, that's cool 😁

chtiland avatar Apr 10 '21 11:04 chtiland