1465{
1474
1475
1477
1478
1479 if (Shrink)
1480 {
1482
1483
1485
1488
1489
1491 {
1495 }
1496 }
1497 else
1498 {
1500 {
1501 DPRINT1(
"Overflow expanding big page table. Size=%lu\n", OldSize);
1504 }
1505
1506
1509 }
1510
1512 {
1513 DPRINT1(
"Overflow while calculating big page table size. Size=%lu\n", OldSize);
1516 }
1517
1519 if (NewTable ==
NULL)
1520 {
1521 DPRINT(
"Could not allocate %lu bytes for new big page table\n", NewSizeInBytes);
1524 }
1525
1526 DPRINT(
"%s big pool tracker table to %lu entries\n", Shrink ?
"Shrinking" :
"Expanding",
NewSize);
1527
1528
1531 {
1533 }
1534
1535
1538 for (
i = 0;
i < OldSize;
i++)
1539 {
1540
1542 {
1543 continue;
1544 }
1545
1546
1548
1549
1551 {
1554 }
1555
1556
1558
1559
1560 NewTable[
Hash] = OldTable[
i];
1561 }
1562
1563
1567
1568
1570
1571
1575
1577}
#define ALIGN_DOWN_BY(size, align)
#define ALIGN_UP_BY(size, align)
#define NT_SUCCESS(StatCode)
static int Hash(const char *)
#define KeReleaseSpinLock(sl, irql)
#define KeGetCurrentIrql()
ULONG ExpPoolBigEntriesInUse
VOID NTAPI ExpRemovePoolTracker(IN ULONG Key, IN SIZE_T NumberOfBytes, IN POOL_TYPE PoolType)
SIZE_T PoolBigPageTableSize
FORCEINLINE ULONG ExpComputePartialHashForAddress(IN PVOID BaseAddress)
PPOOL_TRACKER_BIG_PAGES PoolBigPageTable
#define POOL_BIG_TABLE_ENTRY_FREE
KSPIN_LOCK ExpLargePoolTableLock
VOID NTAPI ExpInsertPoolTracker(IN ULONG Key, IN SIZE_T NumberOfBytes, IN POOL_TYPE PoolType)
SIZE_T PoolBigPageTableHash
_Must_inspect_result_ _In_ USHORT NewSize
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
PVOID NTAPI MiAllocatePoolPages(IN POOL_TYPE PoolType, IN SIZE_T SizeInBytes)
ULONG NTAPI MiFreePoolPages(IN PVOID StartingAddress)
#define RtlZeroMemory(Destination, Length)
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql