mirror_edk2/MdeModulePkg/Core
Ard Biesheuvel 6860b92c84 MdeModulePkg: serve allocations from higher-up bins if current bin is empty
This patch changes the allocation logic for the pool allocator to only
allocate additional pages if the requested allocation cannot be fulfilled
from the current bin or any of the larger ones. If there are larger blocks
available, they will be used to serve the allocation, and the remainder will
be carved up into smaller blocks using the existing carving up logic.
Note that all pool sizes are a multiple of the smallest pool size, so it is
guaranteed that the remainder will be carved up without spilling. Due to the
exponential nature of the pool sizes, the amount of work is logarithmic in
the size of the available block.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17015 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-06 02:57:11 +00:00
..
Dxe MdeModulePkg: serve allocations from higher-up bins if current bin is empty 2015-03-06 02:57:11 +00:00
DxeIplPeim MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
Pei MdeModulePke: PeiCore FirmwareVolmeInfoPpiNotifyCallback ()issue 2014-12-15 09:36:46 +00:00
PiSmmCore Use SmmMemLib to check communication buffer. 2015-02-02 14:42:22 +00:00
RuntimeDxe MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00