mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-07 11:58:41 +03:00
wip: adding mi_remap; first working version
This commit is contained in:
parent
be2f35641a
commit
0c0a753aa0
6 changed files with 74 additions and 28 deletions
|
@ -629,7 +629,8 @@ void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {
|
|||
|
||||
int _mi_prim_alloc_remappable(size_t size, size_t future_reserve, bool* is_pinned, bool* is_zero, void** addr, void** remap_info ) {
|
||||
MI_UNUSED(size); MI_UNUSED(future_reserve); MI_UNUSED(is_pinned); MI_UNUSED(is_zero); MI_UNUSED(addr); MI_UNUSED(remap_info);
|
||||
return EINVAL;
|
||||
// return EINVAL;
|
||||
return _mi_prim_alloc(size, 1, true, true, is_pinned, is_zero, addr);
|
||||
}
|
||||
|
||||
int _mi_prim_realloc_remappable(void* addr, size_t size, size_t newsize, bool* extend_is_zero, void** newaddr, void** remap_info ) {
|
||||
|
@ -639,5 +640,6 @@ int _mi_prim_realloc_remappable(void* addr, size_t size, size_t newsize, bool* e
|
|||
|
||||
int _mi_prim_free_remappable(void* addr, size_t size, void* remap_info ) {
|
||||
MI_UNUSED(addr); MI_UNUSED(size); MI_UNUSED(remap_info);
|
||||
return EINVAL;
|
||||
return _mi_prim_free(addr, size);
|
||||
// return EINVAL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue