是否存在系统范围的全局列表变量

Does a System Wide Global List variable exist

我有一个像这样的 3 维列表:
List<List<List<Vector128<byte>>>> dimensionLIST = new List<List<List<Vector128<byte>>>>();

现在,当我用我用于计算的数据填充此列表时,它将占用 20 GB 的 RAM 内存。

我做的计算需要 10 个小时。所以我创建了一个解决方案,我打开了 10 个应用程序实例,我将工作分成 10 个部分,这将使计算只需要 1 小时 (我的计算机有 24 个内核)

现在的问题是,表单应用程序的每个实例都需要读取此 dimensionLIST,这意味着这将占用 20 GB * 10 = 200 GB RAM,这不是解决方案。

我的问题是,是否有可能将此 dimensionLIST 放入某种系统范围的全局列表变量中,- 所有 10 个实例都可以访问该变量?

(值得一提的是,我不能将这个 dimensionLIST 分成 10 个部分,因为每个实例实际上都需要整个列表)

谢谢!

您可以使用 Named Pipes.

A named pipe is a named, one-way or duplex pipe for communication between the pipe server and one or more pipe clients. All instances of a named pipe share the same pipe name, but each instance has its own buffers and handles, and provides a separate conduit for client/server communication. The use of instances enables multiple pipe clients to use the same named pipe simultaneously. Any process can access named pipes, subject to security checks, making named pipes an easy form of communication between related or unrelated processes.

或者

使用 Windows File Mapping Object 允许您在进程之间共享内存。

如评论中所述,Memory Mapped Files 可能是一个可行的选择