mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-07 03:48:42 +03:00
wip: further improvement for remap
This commit is contained in:
parent
3e1c1f8e9f
commit
e4c914565d
7 changed files with 54 additions and 65 deletions
|
@ -74,16 +74,16 @@ int _mi_prim_alloc_huge_os_pages(void* hint_addr, size_t size, int numa_node, bo
|
|||
// Return `EINVAL` if this is not supported.
|
||||
// The returned memory is always committed.
|
||||
// If `is_pinned` is `true` the memory cannot be decommitted or reset.
|
||||
// The `remap_info` argument can be used to store OS specific information that is passed to `_mi_prim_realloc_remappable` and `_mi_prim_free_remappable`.
|
||||
// The `remap_info` argument can be used to store OS specific information that is passed to `_mi_prim_remap` and `_mi_prim_free_remappable`.
|
||||
int _mi_prim_alloc_remappable(size_t size, size_t future_reserve, bool* is_pinned, bool* is_zero, void** addr, void** remap_info );
|
||||
|
||||
// Remap remappable memory. Return `EINVAL` if this is not supported.
|
||||
// pre: `addr != NULL` and previously allocated using `_mi_prim_realloc_remappable` or `_mi_prim_alloc_remappable`.
|
||||
// pre: `addr != NULL` and previously allocated using `_mi_prim_remap` or `_mi_prim_alloc_remappable`.
|
||||
// `newsize > 0`, `size > 0`, `alignment > 0`, `allow_large != NULL`, `newaddr != NULL`.
|
||||
int _mi_prim_realloc_remappable(void* addr, size_t size, size_t newsize, bool* extend_is_zero, void** newaddr, void** remap_info );
|
||||
int _mi_prim_remap(void* addr, size_t size, size_t newsize, bool* extend_is_zero, void** newaddr, void** remap_info );
|
||||
|
||||
// Free remappable memory. Return `EINVAL` if this is not supported.
|
||||
// pre: `addr != NULL` and previously allocated using `_mi_prim_realloc_remappable` or `_mi_prim_alloc_remappable`.
|
||||
// pre: `addr != NULL` and previously allocated using `_mi_prim_remap` or `_mi_prim_alloc_remappable`.
|
||||
int _mi_prim_free_remappable(void* addr, size_t size, void* remap_info );
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue