>I already posted these questions at one time or another, but never
>got any real answers, so here goes again:
>1) Does Linux work with a Weitek 4167? (FPU...)
>Any details would be helpful.
>2) Has anyone gotten a copy of pico for Linux compiled that doesn't
>have those odd display bugs?
>3) Why doesn't malloc() return a NULL immediately when attempting
>to malloc more than physical+swap? (E.g. 279 megabytes...)
Don't know about 1 and 2, but malloc should only return a NULL
when it can't allocate the requested amount of *virtual* memory.
Each process has around 4G of virtual memory, and 279M is
well below that.
The formula 'virtual mem = swap + physical mem' that I have
seen floating around can be misleading. Linux demand loads
pages into virtual memory, so the pages are not brought in until
they are referenced. In the case of memory allocation, this
means that the pages don't take up space in either swap or
physical mem until you reference them.
From experimentation, it looks like the page tables for such
large virtual memory blocks are created on demand also.
Referencing mem locations about 10,000 bytes apart (or so)
result in 'free' reporting 4K less space (a page was created).
Referencing mem locations 20,000,000 bytes apart result in
8K less space because a new page was created, plus a new page
of the page table was allocated. This is all from pure
observation, so someone correct me if I am wrong.
This doesn't work with calloc(). Is the reason because calloc
want's to go through and zero everything?
>====================================================================
>Software Co-Ordinator | 68 Barrows Hall, UC Berkeley
>Haas Computing Services | Ph: 510-643-5923 Fax: 642-4769
>====================================================================
- Yonik Seeley