Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
fix(arm): remove ExDefaultNonPagedPoolType
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroKaku committed Jul 5, 2022
1 parent de331b6 commit fceea2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
8 changes: 1 addition & 7 deletions src/ucrt/heap/malloc_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,10 @@ extern "C" __declspec(noinline) _CRTRESTRICT void* __cdecl _malloc_base(size_t c
// Ensure we request an allocation of at least one byte:
size_t const actual_size = size == 0 ? 1 : size;

#ifdef POOL_NX_OPTIN_AUTO
POOL_TYPE pool_type = NonPagedPool;
#else
POOL_TYPE pool_type = ExDefaultNonPagedPoolType;
#endif

for (;;)
{
#pragma warning(suppress: 4996)
void* const block = ExAllocatePoolWithTag(pool_type, actual_size, __ucxxrt_tag);
void* const block = ExAllocatePoolWithTag(NonPagedPool, actual_size, __ucxxrt_tag);
if (block)
return block;

Expand Down
10 changes: 2 additions & 8 deletions src/ucrt/heap/realloc_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,10 @@ extern "C" __declspec(noinline) _CRTRESTRICT void* __cdecl _realloc_base(
// Ensure that the requested size is not too large:
_VALIDATE_RETURN_NOEXC(_HEAP_MAXREQ >= size, ENOMEM, nullptr);

#ifdef POOL_NX_OPTIN_AUTO
POOL_TYPE pool_type = NonPagedPool;
#else
POOL_TYPE pool_type = ExDefaultNonPagedPoolType;
#endif

for (;;)
{
void* const new_block = ExReallocatePoolWithTag(_msize_base(block), size, block,
pool_type, __ucxxrt_tag);
void* const new_block = ExReallocatePoolWithTag(
_msize_base(block), size, block, NonPagedPool, __ucxxrt_tag);
if (new_block)
{
return new_block;
Expand Down

0 comments on commit fceea2d

Please sign in to comment.