Skip to content

Instantly share code, notes, and snippets.

@ArcticEcho ArcticEcho/Mark's Method
Last active Aug 29, 2015

Embed
What would you like to do?
// Mark's method.
public unsafe static void TestMethod2()
{
var ptr = Marshal.AllocHGlobal(50000000);
try
{
float* x = (float*)ptr;
for (var ii = 0; ii < 1250000; ii++)
{
x[ii] = 32768;
}
}
finally
{
Marshal.FreeHGlobal(ptr);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.