]>
git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Pei/LzmaPeiMemory.c
2 LZMA Memory Allocation for PEI
4 AllocatePool does not work for large blocks during PEI, so we must
7 Copyright (c) 2006 - 2009, Intel Corporation<BR>
8 All rights reserved. This program and the accompanying materials
9 are licensed and made available under the terms and conditions of the BSD License
10 which accompanies this distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 #include <Library/DebugLib.h>
20 #include <Library/MemoryAllocationLib.h>
21 #include "Sdk/C/Types.h"
32 if (size
> EFI_PAGE_SIZE
) {
33 np
= AllocatePages(EFI_SIZE_TO_PAGES(size
));
35 np
= AllocatePool(size
);
48 if (address
!= NULL
) {
53 ISzAlloc g_Alloc
= { SzAlloc
, SzFree
};