Re: page sizes
- From: Logan Shaw <lshaw-usenet@xxxxxxxxxxxxx>
- Date: Sat, 12 Apr 2008 15:04:33 -0500
copx wrote:
Do memory managers usually use page sizes which are a power of two or not?
Which page size can one expect on Windows/i386 and Linux/i386?
There are API calls, usually, to get this information. Usually it would
best to write software so that it doesn't care about the page size, or if
it does care, will determine it at runtime and respond appropriately.
For what it's worth, the page size might not always be a constant. For
example, on Sun Solaris, there is a feature called Multiple Page Size Support,
which allows different regions of memory to have different page sizes. This
can be useful if you have a large contiguous chunk of data in memory (like
an uncompressed bitmap, for example) that will be treated as a single unit
and doesn't need the granularity of tons of little pages. The reason this
matters is that the granularity has a cost: each page requires an entry in
the TLB, and TLB misses are bad for similar reasons to why cache misses are
bad. Another example of a usage pattern that can work fine with large pages
is the call stack.
- Logan
.
- References:
- page sizes
- From: copx
- page sizes
- Prev by Date: Re: page sizes
- Next by Date: Re: page sizes
- Previous by thread: Re: page sizes
- Next by thread: Re: page sizes
- Index(es):
Relevant Pages
|