diff options
author | Richard Henderson <rth@twiddle.net> | 2012-10-16 17:30:11 +1000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2012-10-20 07:54:04 +0000 |
commit | 3d85a72fd8af6804f66a48d85187f448b14ddba3 (patch) | |
tree | c50d369efdd1317763b7a94eabf5e4698bc5d343 | |
parent | f1bc0bcc9dbbbf5674add3075b5efe0a93fe34f0 (diff) | |
download | qemu-3d85a72fd8af6804f66a48d85187f448b14ddba3.zip qemu-3d85a72fd8af6804f66a48d85187f448b14ddba3.tar.gz qemu-3d85a72fd8af6804f66a48d85187f448b14ddba3.tar.bz2 |
exec: Don't make DEFAULT_CODE_GEN_BUFFER_SIZE too large
For ARM we cap the buffer size to 16MB. Do not allocate 32MB in that case.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r-- | exec.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -529,7 +529,11 @@ bool memory_region_is_unassigned(MemoryRegion *mr) # define MAX_CODE_GEN_BUFFER_SIZE ((size_t)-1) #endif -#define DEFAULT_CODE_GEN_BUFFER_SIZE (32u * 1024 * 1024) +#define DEFAULT_CODE_GEN_BUFFER_SIZE_1 (32u * 1024 * 1024) + +#define DEFAULT_CODE_GEN_BUFFER_SIZE \ + (DEFAULT_CODE_GEN_BUFFER_SIZE_1 < MAX_CODE_GEN_BUFFER_SIZE \ + ? DEFAULT_CODE_GEN_BUFFER_SIZE_1 : MAX_CODE_GEN_BUFFER_SIZE) static inline size_t size_code_gen_buffer(size_t tb_size) { |