aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg.h
diff options
context:
space:
mode:
authorKirill Batuzov <batuzovk@ispras.ru>2012-03-02 13:22:17 +0400
committerBlue Swirl <blauwirbel@gmail.com>2012-03-17 12:57:48 +0000
commit4055299ef0e1c6e4a9b09ce000757b1274129991 (patch)
tree88da249462bdf953ec97618ea9877ad80961a31c /tcg/tcg.h
parentae7d54d489540b49b7c13a7df7ddc220588a2ced (diff)
Fix large memory chunks allocation with tcg_malloc.
An attempt to allocate a large memory chunk after a small one resulted in circular links in list of pools. It caused the same memory being allocated twice for different arrays. Now pools for large memory chunks are kept in separate list and are freed during pool reset because current allocator can not reuse them. Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'tcg/tcg.h')
-rw-r--r--tcg/tcg.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tcg/tcg.h b/tcg/tcg.h
index cc223ea540..92943c11fb 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -337,7 +337,7 @@ typedef struct TCGContext TCGContext;
struct TCGContext {
uint8_t *pool_cur, *pool_end;
- TCGPool *pool_first, *pool_current;
+ TCGPool *pool_first, *pool_current, *pool_first_large;
TCGLabel *labels;
int nb_labels;
TCGTemp *temps; /* globals first, temps after */