Skip to content

Commit 7490195

Browse files
Update WindowsSharedMemory.java
1 parent e8a0915 commit 7490195

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/cn/apisium/shm/impl/WindowsSharedMemory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public WindowsSharedMemory(String name, int size, boolean isCreate) throws Throw
6666
0,
6767
size,
6868
(MemorySegment) Arena.ofAuto().allocateUtf8String(name)
69-
) : (MemorySegment) openFileMapping.invokeExact(SECTION_MAP_WRITE | SECTION_MAP_READ, 0, name);
69+
) : (MemorySegment) openFileMapping.invokeExact(SECTION_MAP_WRITE | SECTION_MAP_READ, 0, (MemorySegment) Arena.ofAuto().allocateUtf8String(name));
7070
if (hMapFile.address() == 0) throw new IllegalStateException("CreateFileMapping failed.");
7171
try {
7272
segment = (MemorySegment) mapViewOfFile.invokeExact(hMapFile, SECTION_MAP_WRITE | SECTION_MAP_READ, 0, 0, size);
@@ -87,4 +87,4 @@ public void close() throws Exception {
8787
throw new Exception(throwable);
8888
}
8989
}
90-
}
90+
}

0 commit comments

Comments
 (0)