Last active
August 29, 2015 14:02
-
-
Save ArcticEcho/9525b8b98be7e241bd4d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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