linux-mips-fnet
[Top] [All Lists]

Re: R5000 Unused memory (was: R4000SC...)

To: ralf@uni-koblenz.de
Subject: Re: R5000 Unused memory (was: R4000SC...)
From: Ulf Carlsson <ulfc@bun.falkenberg.se>
Date: Wed, 21 Oct 1998 13:45:44 +0200
Cc: linux-mips@fnet.fr
In-reply-to: <19981020103052.G676@uni-koblenz.de>; from ralf@uni-koblenz.de on Tue, Oct 20, 1998 at 10:30:52AM +0200
References: <19981013220043.A2620@uni-koblenz.de> <19981015195141.A1697@zigzegv.ml.org> <19981016132433.C3370@uni-koblenz.de> <19981017104618.A3076@zigzegv.ml.org> <19981018111145.J4768@uni-koblenz.de> <19981019111501.A16024@zigzegv.ml.org> <19981020103052.G676@uni-koblenz.de>
Hi Ralf,

I have performed a little test:

First of all I check free memory:

ulfc@dione:~$ free
             total       used       free     shared    buffers     cached
Mem:         28488      19056       9432       8708          4      14108
-/+ buffers/cache:       4944      23544
Swap:            0          0          0

Then I start my test program:

ulfc@dione:~$ ./test
failed to allocate 512 bytes (6307840 bytes already allocated)
spinning ...

And while my test program is spinning I press shift-scroll lock:

Mem-info:
Free pages:        3184kB
 ( Free: 796 (256 512 768)
0*4kB 0*8kB 1*16kB 13*32kB 9*64kB 17*128kB = 3184kB)
Swap cache: add 0/0, delete 0/0, find 0/0
Free swap:            0kB
40959 pages of RAM
33837 reserved pages
2175 pages shared
0 pages swap cached
14 pages in page table cache
901 free pages
Buffer memory:        4kB
Buffer heads:        20
Buffer blocks:        4
Networking buffers in use          : 0
Total network buffer allocations   : 2683812
Total failed network buffer allocs : 0
IP fragment buffer size            : 0

And even ctrl-scroll lock:

                         free                        sibling
  task             PC    stack   pid father child younger older
init       1 S 8804CFAC  4384     1      0  5811
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
kflushd    2 S 00000020  6976     2      1             3
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
kswapd     3 S 8803B4E0  6064     3      1             4     2
   sig: 0 00000000000000000000000000000000 ffffffffffffffffffffffffffffffff : X
rpciod     4 S 880B1690  3104     4      1           171     3
   sig: 0 00000000000000000000000000000000 fffffffffffffffffffffffffffffeff : X
syslogd    9 S 8804CFAC  2656   171      1           180     4
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
klogd     10 R 00000000     0   180      1           191   171
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
atd        8 S 00000000  1744   191      1           202   180
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
crond     12 S 897F4E40     0   202      1           213   191
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
portmap   13 S 8804CFAC  1888   213      1           224   202
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
inetd     14 S 8804CFAC     8   224      1           235   213
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
sshd      15 S 8804CFAC     0   235      1           246   224
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
rpc.mountd  16 S 8804CFAC     0   246      1           255   235
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
rpc.nfsd  17 S 8804CFAC     0   255      1           269   246
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
sendmail  18 S 8804CFAC     0   269      1           281   255
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
gpm       19 S 8804CFAC     0   281      1           294   269
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
login      6 S 89BBC000     8   294      1   299     296   281
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
update     7 S 7FFFFEA4     0   296      1          5793   294
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
bash      20 S 880D76C8     0   299    294
   sig: 0 00000000000000000000000000000002 89e7100089cfffae0000000189b97862 : X
login      5 S 89E9C000     0  5793      1  5794    5811   296
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
bash      26 S 88F4E000     0  5794   5793  5856
   sig: 0 00000000000000000000000000000000 00000000000000000000000000020000 : X
login     11 S 89B8C000    32  5811      1  5812          5793
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
bash      32 S 893D2000     0  5812   5811  5858
   sig: 0 00000000000000000000000000000000 88eba0000000540e0000000100020000 : X
test     -29 R current    832  5856   5794
   sig: 0 00000000000000000000000000000000 00000000000000000000000000000000 : X
cat       21 S 89A4B2D8     0  5858   5812
   sig: 0 00000000000000000000000000000000 88eba0000000540e0000000100000000 : X

That last doesn't make much sense, but it's included anyway..

My little test program (which is a bif fan of the digit 3, its goal is to fill
the whole memory with them) look like this:

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#define BLOCK   512

int main(void)
{
        int i;
        void *p;

        for (i = 0;;i++) {
                if (!(p = malloc(BLOCK))) {
                        printf("failed to allocate %d bytes (%d bytes already 
allocated)\n", BLOCK, BLOCK * i);
                        printf("spinning ... \n");
                        for (;;)
                                ;
                }

                memset(p, 3, BLOCK);    /* do it .. */
        }

        return 0;
}

Doesn't look like an interpreter error to me..

- Ulf

<Prev in Thread] Current Thread [Next in Thread>