mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-08 00:09:31 +03:00
commit
e92358ba49
2 changed files with 4 additions and 3 deletions
|
@ -127,6 +127,7 @@ mi_threadid_t _mi_thread_id(void) mi_attr_noexcept;
|
||||||
size_t _mi_thread_seq_id(void) mi_attr_noexcept;
|
size_t _mi_thread_seq_id(void) mi_attr_noexcept;
|
||||||
mi_tld_t* _mi_thread_tld(void) mi_attr_noexcept;
|
mi_tld_t* _mi_thread_tld(void) mi_attr_noexcept;
|
||||||
void _mi_heap_guarded_init(mi_heap_t* heap);
|
void _mi_heap_guarded_init(mi_heap_t* heap);
|
||||||
|
mi_heap_t* _mi_heap_main_get(void);
|
||||||
|
|
||||||
// os.c
|
// os.c
|
||||||
void _mi_os_init(void); // called from process init
|
void _mi_os_init(void); // called from process init
|
||||||
|
|
|
@ -138,7 +138,7 @@ mi_decl_cache_align const mi_heap_t _mi_heap_empty = {
|
||||||
MI_MEMID_STATIC
|
MI_MEMID_STATIC
|
||||||
};
|
};
|
||||||
|
|
||||||
extern mi_heap_t heap_main;
|
static mi_decl_cache_align mi_heap_t heap_main;
|
||||||
|
|
||||||
static mi_decl_cache_align mi_tld_t tld_main = {
|
static mi_decl_cache_align mi_tld_t tld_main = {
|
||||||
0, // thread_id
|
0, // thread_id
|
||||||
|
@ -153,7 +153,7 @@ static mi_decl_cache_align mi_tld_t tld_main = {
|
||||||
MI_MEMID_STATIC // memid
|
MI_MEMID_STATIC // memid
|
||||||
};
|
};
|
||||||
|
|
||||||
mi_decl_cache_align mi_heap_t heap_main = {
|
static mi_decl_cache_align mi_heap_t heap_main = {
|
||||||
&tld_main, // thread local data
|
&tld_main, // thread local data
|
||||||
NULL, // exclusive arena
|
NULL, // exclusive arena
|
||||||
0, // initial cookie
|
0, // initial cookie
|
||||||
|
@ -266,7 +266,7 @@ static void mi_heap_main_init(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mi_heap_t* heap_main_get(void) {
|
mi_heap_t* _mi_heap_main_get(void) {
|
||||||
mi_heap_main_init();
|
mi_heap_main_init();
|
||||||
return &heap_main;
|
return &heap_main;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue