simplify initial main tld declaration
@@ -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
};
