MATLAB 的堆栈大小是多少? [英] What is the stack size of MATLAB?

查看:52
本文介绍了MATLAB 的堆栈大小是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MATLAB R2018a(64 位)的默认堆栈大小是多少?

What is the default stack size of MATLAB R2018a (64-bit)?

堆栈大小似乎大于 64 位 C# 程序.

It seems that the stack-size is larger than an 64-bit C# program.

我为什么这么问

我问这个问题是因为我打电话给英特尔 MKL LAPACKE_dtrtri 这是高度递归的.

I'm asking this question because I'm calling Intel MKLs LAPACKE_dtrtri which is heavily recursive.

我在 .NET 应用程序中使用该函数,从 C# 调用它时出现堆栈溢出错误,请参阅 BackgroundWorker DoWork 线程的堆栈大小是多少?有办法改吗?

I'm using that function inside .NET application and I'm getting a stack overflow error when calling it from C#, see What is the stack size of a BackgroundWorker DoWork Thread? Is there way to change it?

另一方面,如果我从 MATLAB 调用我的 .NET 应用程序,我不会收到堆栈溢出错误.这就是我想知道 MATLAB 的堆栈大小的原因.

On the other side if I call my .NET application from MATLAB I'm not getting a stack overflow error. That's the reason I wanted to know what the stack size of MATLAB.

推荐答案

使用 dumpbin 命令我可以查看MATLAB.exe 的头文件.

Using the dumpbin command I can take look at the header of the MATLAB.exe.

dumpbin /headers "C:Program FilesMATLABR2018ainwin64MATLAB.exe"

返回

Dump of file C:Program FilesMATLABR2018ainwin64MATLAB.exe

PE signature found

File Type: EXECUTABLE IMAGE

FILE HEADER VALUES
            8664 machine (x64)
...

OPTIONAL HEADER VALUES
...
         4000000 size of stack reserve
            1000 size of stack commit
          100000 size of heap reserve
            1000 size of heap commit

stack Reserve 的大小是十六进制的栈大小.

因此 MATLAB 的堆栈大小为 67108864 Bytes,即 64 Mega Bytes.

So the stack size of MATLAB is 67108864 Bytes which is 64 Mega Bytes.

这篇关于MATLAB 的堆栈大小是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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