tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: where is my memory?
On Wed, Sep 22, 2010 at 9:18 AM, Johnny Billquist <bqt%softjar.se@localhost>
wrote:
> der Mouse wrote:
>>>>>
>>>>> total memory = 2047 MB
>>>>> avail memory = 1999 MB
>>>>
>>>> total memory = 256 MB
>>>> avail memory = 239 MB
>>>
>>> Some graphics chips, especially on lower-end machines, use main
>>> memory, thus making it unavailable to the CPU.
>>
>> It's not that simple. I've seen this for a very long time, including
>> on machines with no graphics chips at all, such as 4.3 on a VAX 750.
>> Here's a live example; this is quoted from /var/run/dmesg.boot on a
>> SPARCstation LX that's my desktop at one of my workplaces:
>>
>> total memory = 48688 KB
>> avail memory = 41676 KB
>>
>> That's with a cg6 with its own private framebuffer RAM.
>
> Well, for VAXen, the difference between total memory, and available
> memory is:
>
>
> ***snip***
>
> format_bytes(pbuf, sizeof(pbuf), avail_end);
> printf("total memory = %s\n", pbuf);
> panicstr = NULL;
> mtpr(AST_NO, PR_ASTLVL);
> spl0();
>
> #if VAX46 || VAX48 || VAX49 || VAX53 || VAXANY
> minaddr = 0;
>
> /*
> * Allocate a submap for physio. This map effectively limits the
> * number of processes doing physio at any one time.
> */
> phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr,
> VM_PHYS_SIZE, 0, false, NULL);
> #endif
>
> format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free));
> printf("avail memory = %s\n", pbuf);
>
> ***snip***
>
> So, obviously a malloc for physio... :-)
>
> Don't know about any other ports, but the code is there for the
> inspection...
>
So in x86 land this is the *_init() functions from
src/sys/kern/init_main.c? Is it just the functions that come before
uvm_init()?
Home |
Main Index |
Thread Index |
Old Index