Re: Known memory leaks in 2.0.31-pre-10-2.1 ?

Ingo Molnar (mingo@pc7537.hil.siemens.at)
Wed, 15 Oct 1997 00:08:05 +0100 (MET)


On Tue, 14 Oct 1997, ADAM Sulmicki wrote:

>
> ->> [adam@eax Linux.all]$ free
> ->> total used free shared buffers cached
> ->> Mem: 63280 62172 1108 5828 272 3104
> ->> -/+ buffers: 58796 4484
> ->> Swap: 130748 19304 111444
> ->
> ->could you do 'Shift-ScrollLock', to see how this 'lost' memory is
> ->distributed within the kernel?
>
> :-) How I do that on {head,floppy,keyboard,mouse}-less machine ? :P

<g>. as far as i know, show_mem() [which is triggered] is called deep
within keyboard.c, and i see no way to trigger this 'externally'.

but you can use this small module:

----=>
void (* show_mem) () = 0xc123567;

int init_module(void)
{
show_mem();
return 0;
}

void cleanup_module(void)
{
}
<=----

just compile it with kernel GCC options. (do 'make kernel/exit.o' to
cut&paste needed GCC options). Plus you have to define the 'show_mem'
value to the address you see in your System.map. Then just 'insmod
stuff.o', and 'dmesg'. Be sure the above show_mem value is correct...

-- mingo