mirror of https://github.com/microsoft/mimalloc
cleanup
This commit is contained in:
parent
479ef4bf4c
commit
cfe3d04299
|
@ -1,5 +1,5 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
Copyright (c) 2019-2020 Microsoft Research, Daan Leijen
|
||||
Copyright (c) 2019-2023 Microsoft Research, Daan Leijen
|
||||
This is free software; you can redistribute it and/or modify it under the
|
||||
terms of the MIT license. A copy of the license can be found in the file
|
||||
"LICENSE" at the root of this distribution.
|
||||
|
|
|
@ -22,10 +22,10 @@ typedef struct mi_os_mem_config_s {
|
|||
} mi_os_mem_config_t;
|
||||
|
||||
// Initialize
|
||||
void _mi_prim_mem_init( mi_os_mem_config_t* config );
|
||||
void _mi_prim_mem_init( mi_os_mem_config_t* config );
|
||||
|
||||
// Free OS memory
|
||||
void _mi_prim_free(void* addr, size_t size );
|
||||
void _mi_prim_free(void* addr, size_t size );
|
||||
|
||||
// Allocate OS memory. Return NULL on error.
|
||||
// The `try_alignment` is just a hint and the returned pointer does not have to be aligned.
|
||||
|
@ -34,14 +34,14 @@ void _mi_prim_free(void* addr, size_t size );
|
|||
void* _mi_prim_alloc(size_t size, size_t try_alignment, bool commit, bool allow_large, bool* is_large);
|
||||
|
||||
// Commit memory. Returns error code or 0 on success.
|
||||
int _mi_prim_commit(void* addr, size_t size, bool commit);
|
||||
int _mi_prim_commit(void* addr, size_t size, bool commit);
|
||||
|
||||
// Reset memory. The range keeps being accessible but the content might be reset.
|
||||
// Returns error code or 0 on success.
|
||||
int _mi_prim_reset(void* addr, size_t size);
|
||||
int _mi_prim_reset(void* addr, size_t size);
|
||||
|
||||
// Protect memory. Returns error code or 0 on success.
|
||||
int _mi_prim_protect(void* addr, size_t size, bool protect);
|
||||
int _mi_prim_protect(void* addr, size_t size, bool protect);
|
||||
|
||||
// Allocate huge (1GiB) pages possibly associated with a NUMA node.
|
||||
// pre: size > 0 and a multiple of 1GiB.
|
||||
|
@ -59,13 +59,13 @@ size_t _mi_prim_numa_node_count(void);
|
|||
mi_msecs_t _mi_prim_clock_now(void);
|
||||
|
||||
// Return process information (only for statistics)
|
||||
void _mi_prim_process_info(mi_msecs_t* utime, mi_msecs_t* stime,
|
||||
void _mi_prim_process_info(mi_msecs_t* utime, mi_msecs_t* stime,
|
||||
size_t* current_rss, size_t* peak_rss,
|
||||
size_t* current_commit, size_t* peak_commit, size_t* page_faults);
|
||||
|
||||
// Default stderr output. (only for warnings etc. with verbose enabled)
|
||||
// msg != NULL && _mi_strlen(msg) > 0
|
||||
void _mi_prim_out_stderr( const char* msg );
|
||||
void _mi_prim_out_stderr( const char* msg );
|
||||
|
||||
// Get an environment variable. (only for options)
|
||||
// name != NULL, result != NULL, result_size >= 64
|
||||
|
|
21
src/static.c
21
src/static.c
|
@ -20,20 +20,21 @@ terms of the MIT license. A copy of the license can be found in the file
|
|||
// containing the whole library. If it is linked first
|
||||
// it will override all the standard library allocation
|
||||
// functions (on Unix's).
|
||||
#include "stats.c"
|
||||
#include "random.c"
|
||||
#include "os.c"
|
||||
#include "bitmap.c"
|
||||
#include "arena.c"
|
||||
#include "region.c"
|
||||
#include "segment.c"
|
||||
#include "page.c"
|
||||
#include "heap.c"
|
||||
#include "alloc.c"
|
||||
#include "alloc-aligned.c"
|
||||
#include "alloc-posix.c"
|
||||
#if MI_OSX_ZONE
|
||||
#include "alloc-override-osx.c"
|
||||
#endif
|
||||
#include "alloc-posix.c"
|
||||
#include "arena.c"
|
||||
#include "bitmap.c"
|
||||
#include "heap.c"
|
||||
#include "init.c"
|
||||
#include "options.c"
|
||||
#include "os.c"
|
||||
#include "page.c"
|
||||
#include "prim/prim.c"
|
||||
#include "random.c"
|
||||
#include "region.c"
|
||||
#include "segment.c"
|
||||
#include "stats.c"
|
||||
|
|
Loading…
Reference in New Issue