]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Core/Dxe/Mem/Pool.c
MdeModulePkg: improve scalability of memory pools
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 6 Mar 2015 02:54:50 +0000 (02:54 +0000)
committerlgao4 <lgao4@Edk2>
Fri, 6 Mar 2015 02:54:50 +0000 (02:54 +0000)
commitf2c7daf675d246261bd5e034b78e200017057df6
treeebabaf71cee521059603085d0c0c58f2f5650baf
parent7970100ccbd48e6f931b078cb8e615eabee26141
MdeModulePkg: improve scalability of memory pools

The existing linear mapping between allocation size and pool index
does not scale when moving to a 64 KB granularity or beyond. With
a granularity of 64 KB, 2048 (!) bins will be created for each
memory type, each differing 32 bytes in size with the next one.

Instead, introduce an exponential scheme where each bin size is
the sum of the two previous ones.

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