SIZE_T dwReservedRegionSize,
size_t *pPrivatePerfCounter_LoaderBytes = NULL,
RangeList *pRangeList = NULL,
- BOOL fMakeExecutable = FALSE,
- BOOL fZeroInit = TRUE);
+ BOOL fMakeExecutable = FALSE);
~UnlockedLoaderHeap();
#endif
}
BOOL IsExecutable();
- BOOL IsZeroInit();
-
public:
#ifdef _DEBUG
DWORD dwCommitBlockSize,
size_t *pPrivatePerfCounter_LoaderBytes = NULL,
RangeList *pRangeList = NULL,
- BOOL fMakeExecutable = FALSE,
- BOOL fZeroInit = TRUE
+ BOOL fMakeExecutable = FALSE
)
: UnlockedLoaderHeap(dwReserveBlockSize,
dwCommitBlockSize,
NULL, 0,
pPrivatePerfCounter_LoaderBytes,
pRangeList,
- fMakeExecutable,
- fZeroInit)
+ fMakeExecutable)
{
WRAPPER_NO_CONTRACT;
m_CriticalSection = NULL;
SIZE_T dwReservedRegionSize,
size_t *pPrivatePerfCounter_LoaderBytes = NULL,
RangeList *pRangeList = NULL,
- BOOL fMakeExecutable = FALSE,
- BOOL fZeroInit = TRUE
+ BOOL fMakeExecutable = FALSE
)
: UnlockedLoaderHeap(dwReserveBlockSize,
dwCommitBlockSize,
dwReservedRegionSize,
pPrivatePerfCounter_LoaderBytes,
pRangeList,
- fMakeExecutable,
- fZeroInit)
+ fMakeExecutable)
{
WRAPPER_NO_CONTRACT;
m_CriticalSection = NULL;
#include "eventtracebase.h"
#define LHF_EXECUTABLE 0x1
-#define LHF_ZEROINIT 0x2
#ifndef DACCESS_COMPILE
SIZE_T dwReservedRegionSize,
size_t *pPrivatePerfCounter_LoaderBytes,
RangeList *pRangeList,
- BOOL fMakeExecutable,
- BOOL fZeroInit)
+ BOOL fMakeExecutable)
{
CONTRACTL
{
m_Options |= LHF_EXECUTABLE;
#endif // CROSSGEN_COMPILE
- if (fZeroInit)
- m_Options |= LHF_ZEROINIT;
-
m_pFirstFreeBlock = NULL;
if (dwReservedRegionAddress != NULL && dwReservedRegionSize > 0)
// Don't fill the memory we allocated - it is assumed to be zeroed - fill the memory after it
memset(pAllocatedBytes + dwRequestedSize, 0xEE, LOADER_HEAP_DEBUG_BOUNDARY);
#endif
- if ((dwRequestedSize > 0) && (m_Options & LHF_ZEROINIT))
+ if (dwRequestedSize > 0)
{
_ASSERTE_MSG(pAllocatedBytes[0] == 0 && memcmp(pAllocatedBytes, pAllocatedBytes + 1, dwRequestedSize - 1) == 0,
"LoaderHeap must return zero-initialized memory");
{
// Cool. This was the last block allocated. We can just undo the allocation instead
// of going to the freelist.
- if (m_Options & LHF_ZEROINIT)
- memset(pMem, 0x00, dwSize); // Fill freed region with 0
+ memset(pMem, 0x00, dwSize); // Fill freed region with 0
m_pAllocPtr = (BYTE*)pMem;
}
else
memset(pAllocatedBytes + dwRequestedSize, 0xee, LOADER_HEAP_DEBUG_BOUNDARY);
#endif
- if ((dwRequestedSize != 0) && (m_Options & LHF_ZEROINIT))
+ if (dwRequestedSize != 0)
{
_ASSERTE_MSG(pAllocatedBytes[0] == 0 && memcmp(pAllocatedBytes, pAllocatedBytes + 1, dwRequestedSize - 1) == 0,
"LoaderHeap must return zero-initialized memory");
return (m_Options & LHF_EXECUTABLE);
}
-BOOL UnlockedLoaderHeap::IsZeroInit()
-{
- return (m_Options & LHF_ZEROINIT);
-}
-
#ifdef DACCESS_COMPILE
void UnlockedLoaderHeap::EnumMemoryRegions(CLRDataEnumMemoryFlags flags)