Author: cgutman
Date: Sun Dec 4 19:06:40 2011
New Revision: 54589
URL: http://svn.reactos.org/svn/reactos?rev=54589&view=rev
Log:
[NTOSKRNL]
- Print a warning and signal RosMm to trim pages if we drop below MmMinimumFreePages in MiRemovePageByColor and MiUnlinkFreeOrZeroedPage
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c [iso-8859-1] Sun Dec 4 19:06:40 2011
@@ -206,6 +206,11 @@
if (--MmAvailablePages < MmMinimumFreePages)
{
/* FIXME: Should wake up the MPW and working set manager, if we had one */
+
+ DPRINT1("Running low on pages: %d remaining\n", MmAvailablePages);
+
+ /* Call RosMm and see if it can release any pages for us */
+ MmRebalanceMemoryConsumers();
}
#if MI_TRACE_PFNS
@@ -330,6 +335,11 @@
if (--MmAvailablePages < MmMinimumFreePages)
{
/* FIXME: Should wake up the MPW and working set manager, if we had one */
+
+ DPRINT1("Running low on pages: %d remaining\n", MmAvailablePages);
+
+ /* Call RosMm and see if it can release any pages for us */
+ MmRebalanceMemoryConsumers();
}
#if MI_TRACE_PFNS
Author: ion
Date: Sun Dec 4 17:25:15 2011
New Revision: 54588
URL: http://svn.reactos.org/svn/reactos?rev=54588&view=rev
Log:
[RTL]: Clarify a comment.
Modified:
trunk/reactos/lib/rtl/path.c
Modified: trunk/reactos/lib/rtl/path.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/path.c?rev=54588&r…
==============================================================================
--- trunk/reactos/lib/rtl/path.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/path.c [iso-8859-1] Sun Dec 4 17:25:15 2011
@@ -890,7 +890,14 @@
Length = CurDir->DosPath.Length / sizeof(WCHAR);
ASSERT((CurDirName != NULL) && (Length > 0));
- /* Check for x:\ vs x:\path\foo (note the trailing slash) */
+ /*
+ * DosPath.Buffer should always have a trailing slash. There is an assert
+ * below which checks for this.
+ *
+ * This function either returns x:\ for a root (keeping the original buffer)
+ * or it returns x:\path\foo for a directory (replacing the trailing slash
+ * with a NULL.
+ */
Bytes = Length * sizeof(WCHAR);
if ((Length <= 1) || (CurDirName[Length - 2] == L':'))
{
Author: ion
Date: Sun Dec 4 16:27:32 2011
New Revision: 54586
URL: http://svn.reactos.org/svn/reactos?rev=54586&view=rev
Log:
[RTL]: Fix a bug in RtlGetCurrentDirectory_U.
Modified:
trunk/reactos/lib/rtl/path.c
Modified: trunk/reactos/lib/rtl/path.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/path.c?rev=54586&r…
==============================================================================
--- trunk/reactos/lib/rtl/path.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/path.c [iso-8859-1] Sun Dec 4 16:27:32 2011
@@ -899,13 +899,13 @@
{
/* Call has no space for it, fail, add the trailing slash */
RtlReleasePebLock();
- return Bytes + sizeof(L'\\');
+ return Bytes + sizeof(OBJ_NAME_PATH_SEPARATOR);
}
}
else
{
/* Check if caller does not have enough space */
- if (MaximumLength <= Bytes)
+ if (MaximumLength < Bytes)
{
/* Call has no space for it, fail */
RtlReleasePebLock();
@@ -917,7 +917,7 @@
RtlCopyMemory(Buffer, CurDirName, Bytes);
/* The buffer should end with a path separator */
- ASSERT(Buffer[Length - 1] == L'\\');
+ ASSERT(Buffer[Length - 1] == OBJ_NAME_PATH_SEPARATOR);
/* Again check for our two cases (drive root vs path) */
if ((Length <= 1) || (Buffer[Length - 2] != L':'))