Re:On Stack Overflow's recent battles with the .NET Garbage ...
by dbattaglia on Saturday October 29, 2011 @08:19AM
(#3171718)
Well, in essence what they did is just store their tag data right on the stack, using CLR structs (which are pretty similar to a C struct or c++ struct/class - allocated on the stack by default). I guess they could have also wrote their own memory allocator, but I'm not so sure it would have been any simpler than the custom allocator they would have implemented in C#, had they went with the AllocHGlobal route. And then they would still have to deal with data marshaling between their native and managed code. Not saying that is necessarily a problem, but it's not always trivial either (especially marshalling custom struct types without causing boxing).
[ Parent
| on HN ]
There are no comments on this comment yet.