Author: tkreuzer Date: Tue May 1 12:47:21 2012 New Revision: 56462
URL: http://svn.reactos.org/svn/reactos?rev=56462&view=rev Log: [WIN32K] Use user mode mem for bitmaps larger than 4K to save pool memory.
Modified: trunk/reactos/win32ss/gdi/ntgdi/bitmaps.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/bitmaps.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/bitmaps.c... ============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/bitmaps.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/bitmaps.c [iso-8859-1] Tue May 1 12:47:21 2012 @@ -143,7 +143,7 @@ IN OPTIONAL LPBYTE pUnsafeBits) { HBITMAP hbmp; - ULONG cRealBpp, cjWidthBytes, iFormat; + ULONG cRealBpp, cjWidthBytes, iFormat, fjBitmap; ULONGLONG cjSize; PSURFACE psurf;
@@ -164,13 +164,16 @@ EngSetLastError(ERROR_INVALID_PARAMETER); return NULL; } + + /* Allocations larger than PAGE_SIZE go into user mem */ + fjBitmap = (cjSize > PAGE_SIZE) ? BMF_USERMEM : 0;
/* Allocate the surface (but don't set the bits) */ psurf = SURFACE_AllocSurface(STYPE_BITMAP, nWidth, nHeight, iFormat, - 0, + fjBitmap, 0, NULL); if (!psurf)