diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/exec/cpu-common.h | 1 | ||||
| -rw-r--r-- | include/qemu-common.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 427b8515a3..fcc316271e 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -52,6 +52,7 @@ typedef uintptr_t ram_addr_t; #endif extern ram_addr_t ram_size; +ram_addr_t get_current_ram_size(void); /* memory API */ diff --git a/include/qemu-common.h b/include/qemu-common.h index 644b46dcdd..1b5cffb403 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -418,6 +418,9 @@ static inline bool is_power_of_2(uint64_t value) /* round down to the nearest power of 2*/ int64_t pow2floor(int64_t value); +/* round up to the nearest power of 2 (0 if overflow) */ +uint64_t pow2ceil(uint64_t value); + #include "qemu/module.h" /* |