Hi,
I have written a dcmd that, given a seg structure address, dumps the 
physical addresses
for all virtual addresses in the segment, or the location on swap if the 
page was paged out,
or prints no mapping for address if the virtual address is not mapped to 
any physical location.
I have a problem with anonymous space.

The code implies that array_chunks that are used to point to anon 
structures can be up to 2 levels deep.
If each array_chunk can contain 1024 entries (1 4k page with each entry 
sizeof pointer on x86,
1 8k page with each entry sizeof pointer on sparc, and, I figure 512 
entries (1 4k page with 8 byte
pointers on x64)), and there are 2 levels, this gives me 1k*1k*4k (4GB) 
on x86, 1k*1k*8k (8GB),
and 512*512*4k (2GB) on x64.  So, what happens with larger anon spaces?
Either there are more levels, or the first level is one or more 
virtually contiguous pages of
array_chunk pointers.  If I had a 64-bit machine handy, I could easily 
figure this out.
Even on a 32-bit machine, I could use a large sparse file in /tmp to 
figure it out, but I don't have enough
free disk space to set up a large enough swap area.  So, anyone know the 
answer to this?

Oh, and before anyone asks "why do you want to do this?", I'll answer, 
"no particular reason".
It might be useful to know physical memory layout when using liblgrp, 
but maybe
there is already a tool for this(?).  I also thought it might be a 
little interesting to know
which pages are paged out, and where.

thanks,
max
 

Reply via email to