Greetings!
We are building a project in which we need Wine to allocate its memory in a shared memory that would be accessible to our custom sub-processes.
We use Wine to run Unity3D. So far so good. Now, the idea is to run 3 independent sub-processes, each with its own graphical context (one per GPU on a 3 GPU machine), which would need to have access to client-side buffers (indices, normals, vertices, etc.). So, in order to do just that, when Unity demands to create such buffers, we want Wine to create these for Unity in shared memory, and then pass the shared memory pointers to the sub processes.
We have explored the map_view and wine_mmap_enum_reserved_areas functions, where memory is allocated. But before we break anything, we'd like to know if there's a recommended, or best, way to do this.
Thanks so much in advance!
Need help with modifying Wine memory allocation in NTDLL
Re: Need help with modifying Wine memory allocation in NTDLL
So why do you need to modify Wine? If you running all processes withing one instance of Wine you can use standard Windows techniques to create shared memory. Nothing special here.temperror wrote:We are building a project in which we need Wine to allocate its memory in a shared memory that would be accessible to our custom sub-processes.
Well it's a little more complicated than that, because the Windows application is Unity, and we have no control over the way Unity asks for its memory to be allocated. We don't have access to Unity's source code either, so we can't modify it. The only thing we can do is recognize when memory is demanded by Unity to Wine, and then make sure it is shared memory that's allocated.
Any tips?
Thanks
Any tips?
Thanks
Need help with modifying Wine memory allocation in NTDLL
On Thu, Oct 27, 2011 at 17:38, temperror <[email protected]> wrote:
You'd better ask this on wine-devel mailing listWell it's a little more complicated than that, because the Windows application is Unity, and we have no control over the way Unity asks for its memory to be allocated. We don't have access to Unity's source code either, so we can't modify it. The only thing we can do is recognize when memory is demanded by Unity to Wine, and then make sure it is shared memory that's allocated.
Any tips?
Thanks
Good luck with that.temperror wrote:The only thing we can do is recognize when memory is demanded by Unity to Wine, and then make sure it is shared memory that's allocated.
Most applications will be allocating/freeing lots of memory all the time. And most of it will be from default application's heap. This can't really be shared, or you risking breaking everything inside Wine. This memory used be everything, not just your application.
The only remote chance if your app virtual allocks some big section for internal use.