Author: cgutman
Date: Sat Dec 10 04:20:39 2011
New Revision: 54632
URL: http://svn.reactos.org/svn/reactos?rev=54632&view=rev
Log:
[USETUP]
- Cache the last data block and offset so we don't have to search from the start each time
- This avoids needless swapping of cabinet data in and out of RAM
- File copy in text-mode setup on 32 MB RAM is down from 8 minutes to 20 seconds (in my testing)
Modified:
trunk/reactos/base/setup/usetup/cabinet.c
trunk/reactos/base/setup/usetup/cabinet.h
Modified: trunk/reactos/base/setup/usetup/cabinet.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/cabinet.…
==============================================================================
--- trunk/reactos/base/setup/usetup/cabinet.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/cabinet.c [iso-8859-1] Sat Dec 10 04:20:39 2011
@@ -757,6 +757,12 @@
// FIXME: check for match against search criteria
if (Search->File != Prev)
{
+ if (Prev == NULL || Search->File->FolderIndex != Prev->FolderIndex)
+ {
+ Search->CFData = NULL;
+ Search->Offset = 0;
+ }
+
/* don't match the file we started with */
if (wcscmp(Search->Search, L"*") == 0)
{
@@ -1011,10 +1017,12 @@
ExtractHandler(Search->File, DestName);
}
- /* find the starting block of the file
- start with the first data block of the folder */
- CFData = (PCFDATA)(CabinetFolders[Search->File->FolderIndex].DataOffset + FileBuffer);
- CurrentOffset = 0;
+ if (Search->CFData)
+ CFData = Search->CFData;
+ else
+ CFData = (PCFDATA)(CabinetFolders[Search->File->FolderIndex].DataOffset + FileBuffer);
+
+ CurrentOffset = Search->Offset;
while (CurrentOffset + CFData->UncompSize <= Search->File->FileOffset)
{
/* walk the data blocks until we reach
@@ -1022,6 +1030,9 @@
CurrentOffset += CFData->UncompSize;
CFData = (PCFDATA)((char *)(CFData + 1) + DataReserved + CFData->CompSize);
}
+
+ Search->CFData = CFData;
+ Search->Offset = CurrentOffset;
/* now decompress and discard any data in
the block before the start of the file */
Modified: trunk/reactos/base/setup/usetup/cabinet.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/cabinet.…
==============================================================================
--- trunk/reactos/base/setup/usetup/cabinet.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/cabinet.h [iso-8859-1] Sat Dec 10 04:20:39 2011
@@ -108,6 +108,8 @@
WCHAR Cabinet[MAX_PATH];
USHORT Index;
PCFFILE File; // Pointer to current CFFILE
+ PCFDATA CFData;
+ ULONG Offset;
} CAB_SEARCH, *PCAB_SEARCH;
Author: cgutman
Date: Sat Dec 10 04:11:19 2011
New Revision: 54631
URL: http://svn.reactos.org/svn/reactos?rev=54631&view=rev
Log:
[NTOSKRNL]
- Print trimmed consumers during text-mode setup too
Modified:
trunk/reactos/ntoskrnl/mm/balance.c
Modified: trunk/reactos/ntoskrnl/mm/balance.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/balance.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/balance.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/balance.c [iso-8859-1] Sat Dec 10 04:11:19 2011
@@ -164,9 +164,8 @@
/* Now swap the pages out */
Status = MiMemoryConsumers[Consumer].Trim(Target, 0, &NrFreedPages);
- if (!ExpInTextModeSetup)
- DPRINT1("Trimming consumer %d: Freed %d pages with a target of %d pages\n", Consumer, NrFreedPages, Target);
-
+ DPRINT1("Trimming consumer %d: Freed %d pages with a target of %d pages\n", Consumer, NrFreedPages, Target);
+
if (NrFreedPages == 0)
DPRINT1("Ran out of pages to swap! Complete memory exhaustion is imminent!\n");
Author: fireball
Date: Fri Dec 9 21:43:03 2011
New Revision: 54629
URL: http://svn.reactos.org/svn/reactos?rev=54629&view=rev
Log:
[LDR]
- Fix invalid errors about "system DLL kernel32.dll was relocated in memory". This reverts my previous fix suggested by rafalh and puts a better explanation there in comments.
Modified:
trunk/reactos/dll/ntdll/ldr/ldrutils.c
Modified: trunk/reactos/dll/ntdll/ldr/ldrutils.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/ldrutils.c?r…
==============================================================================
--- trunk/reactos/dll/ntdll/ldr/ldrutils.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/ldr/ldrutils.c [iso-8859-1] Fri Dec 9 21:43:03 2011
@@ -1397,8 +1397,8 @@
}
}
- /* Check if this was a non-relocatable DLL or a known dll */
- if (!RelocatableDll || KnownDll)
+ /* Known DLLs are not allowed to be relocated */
+ if (KnownDll && !RelocatableDll)
{
/* Setup for hard error */
HardErrorParameters[0] = (ULONG_PTR)&IllegalDll;
Author: fireball
Date: Fri Dec 9 16:47:50 2011
New Revision: 54627
URL: http://svn.reactos.org/svn/reactos?rev=54627&view=rev
Log:
[ACTCTX]
- One more leftover from 54623. Remove actctx_init() from the activation context stack allocation.
Modified:
trunk/reactos/lib/rtl/actctx.c
Modified: trunk/reactos/lib/rtl/actctx.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/actctx.c?rev=54627…
==============================================================================
--- trunk/reactos/lib/rtl/actctx.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/actctx.c [iso-8859-1] Fri Dec 9 16:47:50 2011
@@ -2801,10 +2801,6 @@
*Context = ContextStack;
- /* FIXME: Documentation on MSDN reads that activation contexts are only created
- for modules that have a valid manifest file or resource */
- actctx_init();
-
return STATUS_SUCCESS;
}