Skip to content

Commit 0a8e76e

Browse files
committed
fix windows inprocess issue
Signed-off-by: Simon Davies <[email protected]>
1 parent 1e24b3a commit 0a8e76e

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/hyperlight_host/src/mem/shared_mem.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,6 @@ impl ExclusiveSharedMemory {
388388
#[cfg(target_os = "windows")]
389389
#[instrument(skip_all, parent = Span::current(), level= "Trace")]
390390
pub fn new(min_size_bytes: usize) -> Result<Self> {
391-
#[cfg(inprocess)]
392-
use windows::Win32::System::Memory::FILE_MAP_EXECUTE;
393391
use windows::Win32::System::Memory::{PAGE_NOACCESS, PAGE_PROTECTION_FLAGS};
394392

395393
use crate::HyperlightError::MemoryAllocationFailed;
@@ -436,10 +434,6 @@ impl ExclusiveSharedMemory {
436434
)?
437435
};
438436

439-
#[cfg(inprocess)]
440-
let addr =
441-
unsafe { MapViewOfFile(handle, FILE_MAP_ALL_ACCESS | FILE_MAP_EXECUTE, 0, 0, 0) };
442-
#[cfg(not(inprocess))]
443437
let addr = unsafe { MapViewOfFile(handle, FILE_MAP_ALL_ACCESS, 0, 0, 0) };
444438
if addr.Value.is_null() {
445439
log_then_return!(MemoryAllocationFailed(

0 commit comments

Comments
 (0)