aboutsummaryrefslogtreecommitdiff
path: root/src/malloc.h
AgeCommit message (Collapse)AuthorFilesLines
2021-09-24malloc.c: Implement a PA-RISC specific malloc()Helge Deller1-2/+6
On x86 mremap() is used to provide malloc'ed memory. This can't be used on PA-RISC, so provide an own malloc() implementation. Since PA-RISC is fully 32-/64-bit use "unsigned long" instead of "u32". Signed-off-by: Helge Deller <deller@gmx.de>
2015-10-15malloc: Rename csm_malloc_preinit() to malloc_csm_preinit()Kevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-15malloc: Don't mix virtual and physical addressesKevin O'Connor1-3/+4
Consistently use 'u32' for physical addresses and pointers for virtual addresses in the malloc code. Introduce and use memremap() where a physical address needs to be converted to a virtual address. Use virt_to_phys() for the inverse. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-15malloc: Add warning if free() called on invalid memoryKevin O'Connor1-3/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-12-27Remove the pmm handle argument from _malloc().Kevin O'Connor1-11/+12
The PMM handle argument will almost always be 0xffffffff. Use separate code for the few rare cases where it may not be the default value. Gcc produces better code if _malloc() only requires three parameters. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-09-18Move malloc code from pmm.c to new files malloc.c and malloc.h.Kevin O'Connor1-0/+70
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>