History log of /device/linaro/bootloader/edk2/StdLib/LibC/StdLib/Malloc.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
69c87efff4556df3aac9a12d869b0a9f131edd84 25-Jul-2014 Daryl McDaniel <daryl.mcdaniel@intel.com> StdLib/LibC/StdLib/Malloc.c: Revert cast removal to fix GCC build breakage.

The cast to (void**) is needed for the last parameter of the AllocatePool call in malloc(). This is because type CPOOL_HEAD** is not automatically promoted to void**, as required by AllocatePool().

This was originally addressed in SVN revision 15474 but removed again in 15664.


Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com>
Reviewed by: Stefan Kaeser <stefankaeser@hotmail.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15677 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/StdLib/LibC/StdLib/Malloc.c
dfa51bb619b455315a0476d0f2335da41268a2a2 17-Jul-2014 Daryl McDaniel <daryl.mcdaniel@intel.com> StdLib: Simple code cleanup

StdLib/LibC/Main/Main.c
Change Print to Debug statements.
Ensure errno is initialized to 0 before calling main().

StdLib/LibC/StdLib/Malloc.c
Aesthetic Cleanup: remove unnecessary cast, fix two whitespace alignment problems.

StdLib/LibC/Uefi/InteractiveIO/NonCanonRead.c
Change Include order.

StdLib/Include/paths.h
Add definition _PATH_LIB for the path to the library directory: /Efi/StdLib/lib.

StdLib/LibC/Stdio/vfwscanf.c
Align declarations and initializations.
Initialize the multipurpose pointer, p, to NULL.


Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15664 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/StdLib/LibC/StdLib/Malloc.c
147113644f043b1b9bd88da4e2b4e79150c78084 17-Apr-2014 Paulo Alcantara <pcacjr@zytor.com> StdLib: StdLib/Malloc.c
This patch fixes the following warning:
"expected ‘void **’ but argument is of type ‘struct CPOOL_HEAD **’"

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
Reviewed by: Daryl McDaniel <daryl.mcdaniel@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15474 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/StdLib/LibC/StdLib/Malloc.c
7292c69b2ae18cda8cd21f25daff85da1e69a23d 07-Mar-2014 Daryl McDaniel <daryl.mcdaniel@intel.com> 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
/device/linaro/bootloader/edk2/StdLib/LibC/StdLib/Malloc.c
565b3c807ccb529b07c3b42ef00429aa4e19f882 25-Sep-2012 darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> StdLib/LibC/StdLib/Malloc.c: Make the free() function conform to the ISO/IEC 9899 (C95) specification.

The C95 specification states: "The free function causes the space pointed to by ptr to be deallocated, that is, made available for further allocation. If ptr is a null pointer, no action occurs". The UEFI FreePool() function, which the StdLib implementation of free() uses, does not make this check. This fix adds a check for null to the free() function such that if the pointer argument is NULL, nothing is done.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: erik.c.bjorge@intel.com


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13739 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/StdLib/LibC/StdLib/Malloc.c
2aa62f2bc9a9654687b377d9ca8a8c2c860a3852 27-Apr-2011 darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> Standard Libraries for EDK II.
This set of three packages: AppPkg, StdLib, StdLibPrivateInternalFiles; contains the implementation of libraries based upon non-UEFI standards such as ISO/IEC-9899, the library portion of the C Language Standard, POSIX, etc.

AppPkg contains applications that make use of the standard libraries defined in the StdLib Package.

StdLib contains header (include) files and the implementations of the standard libraries.

StdLibPrivateInternalFiles contains files for the exclusive use of the library implementations in StdLib. These files should never be directly referenced from applications or other code.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11600 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/StdLib/LibC/StdLib/Malloc.c