aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/malloc.h
Commit message (Collapse)AuthorAgeFilesLines
* [malloc] Ensure free memory blocks remain alignedMichael Brown2025-02-031-1/+0
| | | | | | | | | | | | | | | When allocating memory with a non-zero alignment offset, the free memory block structure following the allocation may end up improperly aligned. Ensure that free memory blocks always remain aligned to the size of the free memory block structure. Ensure that the initial heap is also correctly aligned, thereby allowing the logic for leaking undersized free memory blocks to be omitted. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [malloc] Rename malloc_dma() to malloc_phys()Michael Brown2020-11-051-18/+14
| | | | | | | | | | | | The malloc_dma() function allocates memory with specified physical alignment, and is typically (though not exclusively) used to allocate memory for DMA. Rename to malloc_phys() to more closely match the functionality, and to create name space for functions that specifically allocate and map DMA-capable buffers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [malloc] Track maximum heap usageMichael Brown2017-03-221-0/+2
| | | | | | | Track the current and maximum heap usage, and display the maximum during shutdown when DEBUG=malloc is enabled. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [malloc] Rewrite unrelicensable portions of malloc.cMichael Brown2015-03-031-2/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [malloc] Allow allocation of memory with a specified alignment offsetMichael Brown2012-08-311-3/+22
| | | | | | | | Allow for allocation of memory blocks having a specified offset from a specified physical alignment, such as being 12 bytes before a 2kB boundary. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arp] Try to avoid discarding ARP cache entriesMichael Brown2012-07-091-1/+12
| | | | | | | | | Discarding the active ARP cache entry in the middle of a download will substantially disrupt the TCP stream. Try to minimise any such disruption by treating ARP cache entries as expensive, and discarding them only when nothing else is available to discard. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linux] Make malloc and linux_umalloc valgrindablePiotr Jaroszyński2011-03-271-1/+6
| | | | | | | | | | Make the allocators used by malloc and linux_umalloc valgrindable. Include valgrind headers in the codebase to avoid a build dependency on valgrind. Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [malloc] Add cache discard mechanismMichael Brown2010-07-211-0/+17
| | | | | | | Add a facility allowing cached data to be discarded in order to satisfy memory allocations that would otherwise fail. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Rename gPXE to iPXEMichael Brown2010-04-191-0/+59
Access to the gpxe.org and etherboot.org domains and associated resources has been revoked by the registrant of the domain. Work around this problem by renaming project from gPXE to iPXE, and updating URLs to match. Also update README, LOG and COPYRIGHTS to remove obsolete information. Signed-off-by: Michael Brown <mcb30@ipxe.org>