--- src/util.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/util.h b/src/util.h index d2003c1..c27037a 100644 --- a/src/util.h +++ b/src/util.h @@ -435,9 +435,18 @@ static inline void *memalign_low(u32 align, u32 size) { static inline void *memalign_high(u32 align, u32 size) { return pmm_malloc(&ZoneHigh, PMM_DEFAULT_HANDLE, size, align); } +static inline void *memalign_tmplow(u32 align, u32 size) { + return pmm_malloc(&ZoneTmpLow, PMM_DEFAULT_HANDLE, size, align); +} static inline void *memalign_tmphigh(u32 align, u32 size) { return pmm_malloc(&ZoneTmpHigh, PMM_DEFAULT_HANDLE, size, align); } +static inline void *memalign_tmp(u32 align, u32 size) { + void *ret = memalign_tmphigh(align, size); + if (ret) + return ret; + return memalign_tmplow(align, size); +} static inline void free(void *data) { pmm_free(data); }