I'm just guessing here - but some of the bitmap commands attempt to
allocate the memory in kernel storage for blitting efficiency.
--
Scott McPhillips [VC++ MVP]
DDBs are allocated by the driver for the reference DC. This allocation
is made from paged pool. On a machine with that much memory, I would
think your paged pool would be around 192 MB. From that, all such
allocations (and anything else any drivers allocate) must come. So
you can't have a bitmap which exceeds that size, and you can't have
several bitmaps which collectively exceed that size.
On Terminal Server machines, this limit is exaggerated because of how
that pool is shared. There, you'll see a limit of around 28Mb.
This is by design. If you require larger bitmaps in these scenarios,
use DIBSections.
Thanks,
- John
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Visit http://www.microsoft.com/security for current information on security.
Is there any way to influence the size of the paged pool?
Is there any relation between the size of the physical
memory and the size of the paged pool? Are they independent?
Thank you very much, John!
Paged pool size is a fixed function of the amount of memory
installed on the machine. And there is a point of diminishing
returns, above which the paged pool either doesn't grow or
grows slowly. To my knowledge, you cannot influence it, except
as noted above.
If I were you, I'd just use DIBSections.
Thanks,
- John
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Visit http://www.microsoft.com/security for current information on security.
I guess David Solomon's books mentions that paged pool is a fixed region
within kernel mode address space. The whole kernel mode address space is
only 2 GB, shared by system kernel DLLs, pagining tables, kernel mode
drivers, paged pool and non-paged pool. So it's quite crowded. The size of
paged pool is limited by kernel mode address space.
--
Feng Yuan (www.fengyuan.com)
Hi!
I wanted flicker-free drawing and I've done it with the
help of the following technical article:
http://msdn.microsoft.com/library/en-us/dngdi/html/msdn_flicker.asp
This article implements drawing to off-screen memory with
DDBs. Is there any article discussing the way how one can
draw to off-screen memory using DIBSection?
Thank You!
It's the same approach. Replace your call to CreateCompatibleBitmap()
with a call to CreateDIBSection(). Everything else remains the same.
Thank You very much, it works!