diff --git a/qemu/tcg/tcg.h b/qemu/tcg/tcg.h index 908dbef4..3c31f9f8 100644 --- a/qemu/tcg/tcg.h +++ b/qemu/tcg/tcg.h @@ -1058,7 +1058,10 @@ void tcg_optimize(TCGContext *s); static inline void *tcg_malloc(TCGContext *s, int size) { uint8_t *ptr, *ptr_end; - size = (size + sizeof(long) - 1) & ~(sizeof(long) - 1); + + /* ??? This is a weak placeholder for minimum malloc alignment. */ + size = QEMU_ALIGN_UP(size, 8); + ptr = s->pool_cur; ptr_end = ptr + size; if (unlikely(ptr_end > s->pool_end)) {