Author: aandrejevic
Date: Sat Nov 15 01:35:28 2014
New Revision: 65403
URL: http://svn.reactos.org/svn/reactos?rev=65403&view=rev
Log:
[NTVDM]
In non-standalone mode, commit the memory reserved in CreateProcessInternalW instead of
allocating from the heap.
Modified:
trunk/reactos/subsystems/ntvdm/emulator.c
Modified: trunk/reactos/subsystems/ntvdm/emulator.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/ntvdm/emulator.…
==============================================================================
--- trunk/reactos/subsystems/ntvdm/emulator.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/ntvdm/emulator.c [iso-8859-1] Sat Nov 15 01:35:28 2014
@@ -32,6 +32,10 @@
#include "vddsup.h"
#include "io.h"
+
+/* Extra PSDK/NDK Headers */
+#include <ndk/psfuncs.h>
+#include <ndk/mmfuncs.h>
/* PRIVATE VARIABLES **********************************************************/
@@ -554,6 +558,8 @@
BOOLEAN EmulatorInitialize(HANDLE ConsoleInput, HANDLE ConsoleOutput)
{
+#ifdef STANDALONE
+
/* Allocate memory for the 16-bit address space */
BaseAddress = HeapAlloc(GetProcessHeap(), /*HEAP_ZERO_MEMORY*/ 0, MAX_ADDRESS);
if (BaseAddress == NULL)
@@ -561,6 +567,30 @@
wprintf(L"FATAL: Failed to allocate VDM memory.\n");
return FALSE;
}
+
+#else
+
+ NTSTATUS Status;
+ SIZE_T MemorySize = MAX_ADDRESS;
+
+ /* The reserved region starts from the very first page */
+ BaseAddress = NULL;
+
+ /* Commit the reserved memory */
+ Status = NtAllocateVirtualMemory(NtCurrentProcess(),
+ &BaseAddress,
+ 0,
+ &MemorySize,
+ MEM_COMMIT,
+ PAGE_EXECUTE_READWRITE);
+ if (!NT_SUCCESS(Status))
+ {
+ wprintf(L"FATAL: Failed to commit VDM memory.\n");
+ return FALSE;
+ }
+
+#endif
+
/*
* For diagnostics purposes, we fill the memory with INT 0x03 codes
* so that if a program wants to execute random code in memory, we can
Author: pschweitzer
Date: Fri Nov 14 21:01:45 2014
New Revision: 65402
URL: http://svn.reactos.org/svn/reactos?rev=65402&view=rev
Log:
[KMTEST]
Close your eyes.
Really do it! I see you kept them open...
There are closed now?
OK... All fine.
You can open them again.
Nothing happened.
Source code always used to be like that. A commented was never left by mistake in it.
Never, ok?
Modified:
trunk/rostests/kmtests/kmtest_drv/testlist.c
Modified: trunk/rostests/kmtests/kmtest_drv/testlist.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/kmtest_drv/testli…
==============================================================================
--- trunk/rostests/kmtests/kmtest_drv/testlist.c [iso-8859-1] (original)
+++ trunk/rostests/kmtests/kmtest_drv/testlist.c [iso-8859-1] Fri Nov 14 21:01:45 2014
@@ -77,7 +77,6 @@
{ "-ExTimer", Test_ExTimer },
{ "Example", Test_Example },
{ "FsRtlExpression", Test_FsRtlExpression },
- /* Skipped on testman. See ROSTESTS-106. */
{ "FsRtlMcb", Test_FsRtlMcb },
{ "-FsRtlTunnel", Test_FsRtlTunnel },
{ "IoCreateFile", Test_IoCreateFile },