mirror of
https://github.com/microsoft/mimalloc.git
synced 2024-12-27 05:11:11 +08:00
simplify initial main tld declaration
This commit is contained in:
parent
66048cb6cc
commit
32b3608581
@ -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
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user