1

How can I find out how much memory my App is using from inside the app itself, using MonoTouch?

I basically want this:

Watching memory usage in iOS

which calls things like "task_info"

but for MonoTouch (it's OK if works only on iOS). I don't want a memory tool, like Instruments, etc, I just want to know the memory used from inside the App itself, so I can display it and be able to check it isn't too much in various field trials, etc.

4

1 回答 1

1

我看到至少两个选项:

  • 将“task_info”代码复制到一个新的 Xcode 项目中并从中创建一个静态库。然后在 MonoTouch 项目中链接该静态库,并使用 P/Invoke 调用 logMemUsage。

  • 将所有“task_info”代码翻译成 C#(在需要时使用 P/Invokes 调用本机方法)。

我可能会选择第一个选项,我相信它不太容易出错。

于 2013-01-29T12:52:24.243 回答