Unmap virtual memory address is the memory address to unmap, as returned from _memory_map size is the number of bytes to unmap, which might be less than full region for a partial unmap offset is the offset in bytes to the actual mapped region, as set by _memory_map release is set to 0 for partial unmap, or size of entire range for a full unmap
| 920 | // offset is the offset in bytes to the actual mapped region, as set by _memory_map |
| 921 | // release is set to 0 for partial unmap, or size of entire range for a full unmap |
| 922 | static void |
| 923 | _rpmalloc_unmap(void* address, size_t size, size_t offset, size_t release) { |
| 924 | rpmalloc_assert(!release || (release >= size), "Invalid unmap size"); |
| 925 | rpmalloc_assert(!release || (release >= _memory_page_size), "Invalid unmap size"); |
| 926 | if (release) { |
| 927 | rpmalloc_assert(!(release % _memory_page_size), "Invalid unmap size"); |
| 928 | _rpmalloc_stat_sub(&_mapped_pages, (release >> _memory_page_size_shift)); |
| 929 | _rpmalloc_stat_add(&_unmapped_total, (release >> _memory_page_size_shift)); |
| 930 | } |
| 931 | _memory_config.memory_unmap(address, size, offset, release); |
| 932 | } |
| 933 | |
| 934 | //! Default implementation to map new pages to virtual memory |
| 935 | static void* |
no outgoing calls
no test coverage detected