4 ms·
If the manually allocated memory may contain references to managed objects then it still needs to be traced by the gc. That or you start pinning managed objec
by Tarean 8y ago
If the manually allocated memory may contain references to managed objects then it still needs to be traced by the gc.
That or you start pinning managed objects or pull everything related into manual world. Both kinda suck.
- pjmlp 8y agoManually allocated memory in some of those languages is only allowed in the context of unsafe packages. In any case, the point is that you should only do that for the code paths that actually matter, after profiling the application and not everywhere. Be productive, make use of the GC, naturally taking into the consideration the algorithms + data structures being used. If that is still not enough to meet the application's SLAs, then manually allocation comes into play.