mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
To improve for example handling of OOM-states during fuzzing we provides options to limit maximum size of single allocation operation. Extends checks for Free operations and integer underflow/overflow handling.
28 lines
558 B
C
28 lines
558 B
C
/** @file
|
|
Copyright (c) 2022, vit9696. All rights reserved.
|
|
SPDX-License-Identifier: BSD-3-Clause
|
|
**/
|
|
|
|
#ifndef USER_MEMORY_H
|
|
#define USER_MEMORY_H
|
|
|
|
//
|
|
// Limits single pool allocation size to 512MB by default.
|
|
//
|
|
extern UINTN mPoolAllocationSizeLimit;
|
|
|
|
extern UINTN mPoolAllocations;
|
|
extern UINTN mPageAllocations;
|
|
|
|
extern UINT64 mPoolAllocationMask;
|
|
extern UINTN mPoolAllocationIndex;
|
|
extern UINT64 mPageAllocationMask;
|
|
extern UINTN mPageAllocationIndex;
|
|
|
|
VOID
|
|
SetPoolAllocationSizeLimit (
|
|
UINTN AllocationSize
|
|
);
|
|
|
|
#endif // USER_MEMORY_H
|