Could someone comment on this?
Cheers,
Bill
I think the author may have had this in mind (though this may still
report inaccurately on a few architectures):
--- linux-2.4.17-pre4-virgin/fs/proc/array.c Thu Oct 11 09:00:01 2001
+++ linux-2.4.17-pre4/fs/proc/array.c Thu Dec 6 13:36:33 2001
@@ -75,6 +75,7 @@
#include <asm/pgtable.h>
#include <asm/io.h>
#include <asm/processor.h>
+#include <linux/elf.h>
/* Gcc optimizes away "strlen(x)" for constant x */
#define ADDBUF(buffer, string) \
@@ -491,14 +492,13 @@
share += shared;
dt += dirty;
size += total;
- if (vma->vm_flags & VM_EXECUTABLE)
- trs += pages; /* text */
- else if (vma->vm_flags & VM_GROWSDOWN)
- drs += pages; /* stack */
- else if (vma->vm_end > 0x60000000)
- lrs += pages; /* library */
- else
- drs += pages;
+ if (vma->vm_flags & VM_EXECUTABLE) {
+ if(vma->vm_end > ELF_ET_DYN_BASE)
+ lrs += pages; /* library */
+ else
+ trs += pages; /* text */
+ } else
+ drs += pages; /* stack and data */
vma = vma->vm_next;
}
up_read(&mm->mmap_sem);
-
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/