justinstenning / SharedMemory

C# shared memory classes for sharing data between processes (Array, Buffer and Circular Buffer)
https://www.nuget.org/packages/SharedMemory
Other
573 stars 117 forks source link

Would like support for jagged arrays #18

Open kasajian opened 8 years ago

kasajian commented 8 years ago

In C#, you can create jagged array is an array of objects, where each object is another array. A buffer cannot contain objects. Also these individual arrays can be variable length. In order to put a jagged array into a buffer (i.e. one _flat array), we need to flatted out all the data into a memory buffer, but then have a mechanism for application code to view it as a jagged array.

I have a possible implementation that I'm working with: https://github.com/kasajian/SharedMemory/tree/JaggedArrayDev There's unit-tests there and comments on how to use it.

I haven't created a pull request yet because I want to try it in a real-world application first, and see how it goes. There may be a few things I might want to change.

justinstenning commented 6 years ago

@kasajian how did you get on with this one?