Skip to contentSkip to conversation

Just cosmethic but...

DISCUSSION DervishD 3 participants 4 messages Aug 4, 2002 – Aug 5, 2002

lore
Share & tools
lore

DervishD

author
#0 lore raw

Hi all :)

The output of 'cat /proc/meminfo' is ugly by today standards,
since is very frequent having more than 99 Mb of RAM and the current meminfo just supports 8 digits before outputting ugly tabulations.

So, how about raising that 8 digits to at least 10, thus allowing
pretty tabulations up to 9 Gb of RAM?

If it will be accepted I can make the patch against the current
-ac kernel, for example. I know that is only a cosmethic change, but I use meminfo a lot and I would like to see a good tabulation ;))

Raúl

#1 lore raw
Quoted 9 lines · On 20020805 DervishD wrote:

Hi all :)

The output of 'cat /proc/meminfo' is ugly by today standards,
since is very frequent having more than 99 Mb of RAM and the current meminfo just supports 8 digits before outputting ugly tabulations.

So, how about raising that 8 digits to at least 10, thus allowing
pretty tabulations up to 9 Gb of RAM?

Why 10 ?

    unsigned long k32= ~0;
    unsigned long long k64 = ~0;
    printf("%d %lu\n",sizeof(k32)*8,k32);
    printf("%d %llu\n",sizeof(k64)*8,k64);

gives

32 4294967295
64 18446744073709551615

On a 64 bit box you could have 2^64 bytes. Opps, and on a 32bit box you could have 16Gb of swap ? 1Tb is:

    unsigned long long k64 = 1ULL<<40;

64 1099511627776

13 digits (nice number ;))

Sorry, late at night here...

Signature · 4 lines
J.A. Magallon                           \                 Software is like sex:
junk.able.es                             \           It's better when it's free
Mandrake Linux release 9.0 (Cooker) for i586
Linux 2.4.19-jam0 (gcc 3.2 (Mandrake Linux 9.0 3.2-0.2mdk))
author
#2 lore raw

Hi Magallon :)

Quoted 3 lines
Quoted 2 lines

So, how about raising that 8 digits to at least 10, thus allowing
pretty tabulations up to 9 Gb of RAM?

Why 10 ?

Just for being conservative ;)) Truly, the whole format should be
changed, but...

Quoted 1 line

13 digits (nice number ;))

I think that 13 digits will fit well too ;))

Raúl

#3 lore raw
Quoted 2 lines · DervishD

Truly, the whole format should be changed, but...

In that case try removing the first three lines, and start fixing all userspace programs that breaks.

Signature · 3 lines
Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use mailto:[email protected]
or mailto:[email protected]