Skip to contentSkip to conversation

size of /proc/kcore grows?

DISCUSSION Christian Kujau 1 participant 1 message Mar 9, 2005

lore
Share & tools
lore
#0 lore raw
Quoted 2 lines · Tony Luck

Take a look at the driver (fs/proc/kcore.c) that creates this pseudo-file.

will do ;)

Quoted 6 lines

Initially the size of the file is set from the size of your memory.

Reading the file has the side-effect of setting up the ELF headers to make this look like an ELF file ... in fact a sparse one. Use "objdump" (with the "-p" flag I think) to show the headers, and you'll see which offsets in the file correspond to which kernel virtual addresses.

ah, well. i was just curious, why the file on the filesystem did not grow beyond 4 times of the size of the ram. i just reproduced it on another machine, booted with "mem=48M" and "dd" tried to write out a file until E_NOSPACE happens, just as expected.

thank you,
Christian.

Signature · 3 lines
BOFH excuse #133:

It's not plugged in.