Author: jimtabor
Date: Sun Jul 12 02:52:36 2009
New Revision: 41896
URL: http://svn.reactos.org/svn/reactos?rev=41896&view=rev
Log:
- Global/LocalFlags, now checking the right bit for discared heap and not doing it the wine way.
Modified:
trunk/reactos/dll/win32/kernel32/mem/global.c
trunk/reactos/dll/win32/kernel32/mem/local.c
Modified: trunk/reactos/dll/win32/kernel32/mem/global.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/mem/glo…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/mem/global.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/mem/global.c [iso-8859-1] Sun Jul 12 02:52:36 2009
@@ -224,7 +224,7 @@
/* Get the lock count first */
uFlags = HandleEntry->LockCount & GMEM_LOCKCOUNT;
- /* Now check if it's discarded */
+ /* Now check if it's discardable */
if (HandleEntry->Flags & BASE_HEAP_ENTRY_FLAG_REUSABLE)
{
/* Set the Win32 Flag */
@@ -238,7 +238,10 @@
uFlags |= GMEM_DDESHARE;
}
- if (!HandleEntry->Object) uFlags |= GMEM_DISCARDED;
+ /* Now check if it's discarded */
+ if (HandleEntry->Flags & BASE_HEAP_ENTRY_FLAG_REUSE)
+ /* Set the Win32 Flag */
+ uFlags |= GMEM_DISCARDED;
}
}
Modified: trunk/reactos/dll/win32/kernel32/mem/local.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/mem/loc…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/mem/local.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/mem/local.c [iso-8859-1] Sun Jul 12 02:52:36 2009
@@ -201,14 +201,17 @@
/* Get the lock count first */
uFlags = HandleEntry->LockCount & LMEM_LOCKCOUNT;
- /* Now check if it's discarded */
+ /* Now check if it's discardable */
if (HandleEntry->Flags & BASE_HEAP_ENTRY_FLAG_REUSABLE)
{
/* Set the Win32 Flag */
uFlags |= LMEM_DISCARDABLE;
}
- if (!HandleEntry->Object) uFlags |= LMEM_DISCARDED;
+ /* Now check if it's discarded */
+ if (HandleEntry->Flags & BASE_HEAP_ENTRY_FLAG_REUSE)
+ /* Set the Win32 Flag */
+ uFlags |= LMEM_DISCARDED;
}
}