CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 19

Threaded View

  1. #1
    Join Date
    Jan 2008
    Location
    Istanbul - Turkey
    Posts
    3

    Grr, garbage collector, stay away from my arrays!

    Hi;

    I need a memory block allocated on heap (on a fixed posisiton) that GC can't move. I need this because unmanaged code will read data from this memory block on a multi-threaded manner (so "fixed" statement will not work since threads in unmanaged code may still be manipulating this memory though code flow fell out of fixed scope).

    Is this possible with C#? Or do you recommend using nasty GlobalAlloc api to allocate memory on heap manually from C#?

    Thanks all...
    Last edited by BlueEyedCat; January 25th, 2008 at 12:22 PM.
    .NET 2.0 - VStudio2005

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured