mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
clarify needs_recommit
This commit is contained in:
parent
5c39fe7246
commit
1d231be758
5 changed files with 22 additions and 22 deletions
|
@ -262,9 +262,9 @@ int _mi_prim_commit(void* addr, size_t size) {
|
|||
return (p == addr ? 0 : (int)GetLastError());
|
||||
}
|
||||
|
||||
int _mi_prim_decommit(void* addr, size_t size, bool* decommitted) {
|
||||
int _mi_prim_decommit(void* addr, size_t size, bool* needs_recommit) {
|
||||
BOOL ok = VirtualFree(addr, size, MEM_DECOMMIT);
|
||||
*decommitted = true; // for safetly, assume always decommitted even in the case of an error.
|
||||
*needs_recommit = true; // for safetly, assume always decommitted even in the case of an error.
|
||||
return (ok ? 0 : (int)GetLastError());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue