]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Core/Dxe/Mem/Pool.c
MdeModulePkg: use index to traverse free pool pages
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 6 Mar 2015 02:55:35 +0000 (02:55 +0000)
committerlgao4 <lgao4@Edk2>
Fri, 6 Mar 2015 02:55:35 +0000 (02:55 +0000)
commit7e8e22056b721203f29b3ee982a64e98b0cbc22a
treea25931c438950a714b3b3d4c6c1f83e25adfd591
parentf2c7daf675d246261bd5e034b78e200017057df6
MdeModulePkg: use index to traverse free pool pages

In preparation of making the pool code capable of serving allocations
from higher-up bins, update the free path to traverse a candidate page
by following the index of POOL_FREE header instead of duplicating the
carving logic that was used at page allocation time. This allows chunks
to be split into smaller ones, where one can be returned to serve the
allocation, and the other stored in a smaller bin for later use.

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@17013 6f19259b-4bc3-4df7-8a09-765794883524
MdeModulePkg/Core/Dxe/Mem/Pool.c