什么是堆栈溢出实际上在.NET的世界是什么意思? [英] What does stack overflow actually mean in a .Net world?

查看:175
本文介绍了什么是堆栈溢出实际上在.NET的世界是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是栈溢出实际上在.NET垃圾回收的世界是什么意思?

What does stack overflow actually mean in a .Net garbage collected world?

推荐答案

一个堆栈溢出和垃圾收集基本上是正交的概念:堆与堆。垃圾收集器的目的是收回其中住在堆中不可获得的对象。当执行堆栈超​​出当前线程所允许的极限时,会发生堆栈溢出。堆栈上的所有项目都是由分辨​​率可达因此垃圾收集器可以做什么来清理堆栈

A stack overflow and garbage collection are essentially orthogonal concepts: stack vs. heap. The purpose of the garbage collector is to reclaim unreachable objects which live in the heap. A stack overflow occurs when the execution stack exceeds the limit allowed by the current thread. All items on the stack are by definition reachable hence the garbage collector can do nothing to "clean up" the stack

这篇关于什么是堆栈溢出实际上在.NET的世界是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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