lkml.org 
[lkml]   [2003]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: 2.6.0-test2 : size of /proc/kcore is different from RAM size.
Date
From
> I have noticed that the /proc/kcore file has a different size (1Go) 
> compared with the available memory of my box (640Mo).
>
> [root@tigre01 kernel]# dmesg | grep Memory
> Memory: 643148k/655360k available (2331k kernel code, 11424k reserved,
> 730k data, 348k init, 0k highmem)
>
> [root@tigre01 proc]# ls -l /proc | grep kcore
> -r-------- 1 root root 1073692672 Aug 10 21:43 kcore
> [root@tigre01 proc]#
>
> Is it a bug or just a new behaviour of the /proc/kcore?

New behaivour ... /proc/kcore is a pseudo-file that tries to
look as much like a "core" file as possible. For architectures
that use ELF executable format, this means that it starts with
an ELF header, then a few elf_phdr structures to describe the
various virtual sections, and then the sections themselves. You
can use "objdump -fp" to display these in human readable form.

/proc/kcore will usually be somewhat sparse, as the offsets chosen
for the sections within the file depend on the virtual addresses
of the sections in kernel virtual memory.

The size of the file should be large enough to cover all of the
sections. One glitch, that probably ought to be fixed, is that
the size is initially assigned based on memory size, but the first
time the file is opened we compute the correct size for all the
sections.

-Tony Luck

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.032 / U:1.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site