From 32b360858177bd8d78a2b35b9ced3c2c676fb4ac Mon Sep 17 00:00:00 2001 From: daan Date: Wed, 17 Jun 2020 13:12:05 -0700 Subject: [PATCH] simplify initial main tld declaration --- src/init.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/init.c b/src/init.c index 132043e8..92115283 100644 --- a/src/init.c +++ b/src/init.c @@ -105,10 +105,6 @@ const mi_heap_t _mi_heap_empty = { // the thread-local default heap for allocation mi_decl_thread mi_heap_t* _mi_heap_default = (mi_heap_t*)&_mi_heap_empty; - -#define tld_main_stats ((mi_stats_t*)((uint8_t*)&tld_main + offsetof(mi_tld_t,stats))) -#define tld_main_os ((mi_os_tld_t*)((uint8_t*)&tld_main + offsetof(mi_tld_t,os))) - extern mi_heap_t _mi_heap_main; static mi_tld_t tld_main = { @@ -116,9 +112,9 @@ static mi_tld_t tld_main = { &_mi_heap_main, &_mi_heap_main, { { NULL, NULL }, {NULL ,NULL}, {NULL ,NULL, 0}, 0, 0, 0, 0, 0, 0, NULL, - tld_main_stats, tld_main_os + &tld_main.stats, &tld_main.os }, // segments - { 0, tld_main_stats }, // os + { 0, &tld_main.stats }, // os { MI_STATS_NULL } // stats };