Package: dphys-swapfile
Version: 20061020-1
Severity: normal

As noted in bug 564466 on AMD 64 systems the /proc/kcore size is reported as 
excessively large
due to the handling of vmalloc on that platform.

The kernel documentation was in error, claiming that kcore would be size of 
memory with a small adjustment 
when it is (now at least) more complex than that.

If we must rely on /proc interface then the second field of the first line of 
/proc/meminfo contains
size of RAM. As per changes below, however I'm not sure if relying on /proc is 
a good idea, I haven't checked kernel source to see if it is always the first 
line, or if the unit field is hard coded. So probably wise to make a more 
robust case than this.

I'm still trying to understand fully how AMD64 handles memory usage so probably 
wise to run this past someone who does understand the topic better.

52c52
<       KCORESIZE="`ls -l /proc/kcore | awk '{ print $5 }'`"
---
>       # KCORESIZE="`ls -l /proc/kcore | awk '{ print $5 }'`"
54c54,55
<       MEMSIZE="`expr "${KCORESIZE}" / 1048576 + 1`"
---
>       KCORESIZE="`head -1 /proc/meminfo | awk '{ print $2 }'`"
>       MEMSIZE="`expr "${KCORESIZE}" / 1024 + 1`"



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to