MCPcopy Index your code
hub / github.com/RustPython/RustPython / UnmapViewOfFile

Function UnmapViewOfFile

crates/vm/src/stdlib/_winapi.rs:2000–2012  ·  view source on GitHub ↗
(address: isize, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1998 /// UnmapViewOfFile - Unmap a mapped view of a file.
1999 #[pyfunction]
2000 fn UnmapViewOfFile(address: isize, vm: &VirtualMachine) -> PyResult<()> {
2001 use windows_sys::Win32::System::Memory::MEMORY_MAPPED_VIEW_ADDRESS;
2002
2003 let view = MEMORY_MAPPED_VIEW_ADDRESS {
2004 Value: address as *mut core::ffi::c_void,
2005 };
2006 let ret = unsafe { windows_sys::Win32::System::Memory::UnmapViewOfFile(view) };
2007
2008 if ret == 0 {
2009 return Err(vm.new_last_os_error());
2010 }
2011 Ok(())
2012 }
2013
2014 /// VirtualQuerySize - Return the size of a memory region.
2015 #[pyfunction]

Callers 1

dropMethod · 0.85

Calls 2

new_last_os_errorMethod · 0.80
ErrClass · 0.50

Tested by

no test coverage detected