free every huge page in a range individually (as we allocated per page) note: needed with VirtualAlloc but could potentially be done in one go on mmap'd systems.
| 1329 | // free every huge page in a range individually (as we allocated per page) |
| 1330 | // note: needed with VirtualAlloc but could potentially be done in one go on mmap'd systems. |
| 1331 | void _mi_os_free_huge_pages(void* p, size_t size, mi_stats_t* stats) { |
| 1332 | if (p==NULL || size==0) return; |
| 1333 | uint8_t* base = (uint8_t*)p; |
| 1334 | while (size >= MI_HUGE_OS_PAGE_SIZE) { |
| 1335 | _mi_os_free(base, MI_HUGE_OS_PAGE_SIZE, stats); |
| 1336 | size -= MI_HUGE_OS_PAGE_SIZE; |
| 1337 | base += MI_HUGE_OS_PAGE_SIZE; |
| 1338 | } |
| 1339 | } |
| 1340 | |
| 1341 | /* ---------------------------------------------------------------------------- |
| 1342 | Support NUMA aware allocation |
no test coverage detected