]> git.proxmox.com Git - mirror_edk2.git/commit
StdLib: Modify the memory allocation routines to not be dependent upon the internal...
authorDaryl McDaniel <daryl.mcdaniel@intel.com>
Fri, 7 Mar 2014 01:05:30 +0000 (01:05 +0000)
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 7 Mar 2014 01:05:30 +0000 (01:05 +0000)
commit7292c69b2ae18cda8cd21f25daff85da1e69a23d
treef291833dc866cbcf7daccd9bd5b9052305d0c0ca
parentde2eccc46a58280f259e60c6353b700e3a5aaddb
StdLib: Modify the memory allocation routines to not be dependent upon the internal structure of the EDK II memory pool.

StdLib/LibC/StdLib/Malloc.c
Create a private data structure, CPOOL_HEAD, which contains housekeeping information for StdLib’s memory allocation functions.  An instance of this structure is prepended to every chunk of allocated memory.  The structure links the allocation into a doubly-linked list and keeps track of the size of each allocation unit.  This information is then available for use by the realloc function.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
Reviewed-by: Rosenbaum, Lee G <lee.g.rosenbaum@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15319 6f19259b-4bc3-4df7-8a09-765794883524
StdLib/LibC/StdLib/Malloc.c