这些存储在哪里? [英] Where these are stored?

查看:119
本文介绍了这些存储在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在.net上学习GC。我想知道,我的整数,浮点数或值类型,存储的静态变量,函数的成员,函数中的值类型都存储在哪里。

您有任何文件或任何关于此主题的网页链接,请在此处张贴。

谢谢,
Harsha

解决方案

我有一篇关于这个问题的文章,但你应该真的阅读Eric Lippert的各种博客文章。 关于价值的真相类型可能是最重要的一个,以及堆栈是实现细节(第一部分; 第二部分)。

<从根本上来说,理解垃圾收集在可达性等方面更重要,而不是内存中什么地方的实现细节。该可以在性能方面有所帮助,但您需要不断提醒自己这是一个实现细节。


I am learning GC on .net. I would like to know, where are my integers, floats or value types, static variable stored, Member of the functions, value types in the function are stored.

Any documents or any weblink you have on this topics, please post it here.

Thank you, Harsha

解决方案

I have an article which talks about this a bit, but you should really read various blog posts by Eric Lippert. "The truth about value types" is probably the most important one, along with "The stack is an implementation detail" (part one; part two).

Fundamentally it's more important to understand garbage collection in terms of reachability etc, rather than the implementation details of what goes where in memory. That can be helpful in terms of performance, but you need to keep reminding yourself that it's an implementation detail.

这篇关于这些存储在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆