dotnet内存管理和托管堆 [英] dotnet memory management and managed heap

查看:114
本文介绍了dotnet内存管理和托管堆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

@ RJP1973说

@RJP1973 said

所有内存最终都由操作系统授予,但是.Net运行时管理.Net环境(托管堆)中的所有内存.

All memory is ultimately granted by the operating system, but the .Net run-time manages all memory in the .Net environment (the managed heap).

如果内存是由OS分配的,那么dotnet完成了哪些与内存管理相关的工作?

if memory is allocated by OS then what kind of memory management related job done dotnet ?

dotnet只释放内存,我的意思是垃圾回收?

dotnet only de-allocate memory i mean garbage collection ?

请在这里放点光.谢谢

推荐答案

您好,Mou_kolkata,

Hi Mou_kolkata,

.NET Framework的垃圾回收器管理应用程序的内存分配和释放.每次创建 作为一个新对象,公共语言运行库为托管堆中的对象分配内存.只要托管堆中有可用的地址空间,运行时就会继续为新对象分配空间.

The .NET Framework's garbage collector manages the allocation and release of memory for your application. Each time you create a new object, the common language runtime allocates memory for the object from the managed heap. As long as address space is available in the managed heap, the runtime continues to allocate space for new objects.


这篇关于dotnet内存管理和托管堆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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