memory-profiling

Getting memory usage Live/Dirty Bytes in iOS app programmatically (not Resident/Real Bytes)

喜夏-厌秋 提交于 2019-12-06 09:53:08
According to what I've read so far, real/resident bytes indicates the number of bytes allocated to the app including bytes that the app is no longer using but hasn't been reclaimed by the OS. And live/dirty bytes is the bytes the the app is actually using and the OS can't reclaim. I think that the number shown in XCode Debug navigator is Live Bytes. I'm interested in getting this number programmatically (for our own statistics/analytics), but the code I found can only give the value of resident bytes, which is larger than the value that Xcode is showing on some devices (almost twice is large),

How do I run stand-alone Eclipse MAT?

梦想的初衷 提交于 2019-12-05 23:09:24
I generated hprof using jmap. sudo ~/jdk/bin/jmap -F -dump:file=app.hprof 5003 Now, I am getting OOM / 'Java Heap Space' error while parsing *.hprof in eclipse. I think I need to run it as stand-alone. How do I run it? any references? I assume, you've downloaded Eclipse MAT in the form of Standalone Eclipse RCP Application . If not - do so now, and extract the archive to a folder that suits you. You're getting the OOME, because MAT has too few memory available (the heap-dump you're parsing is too big). To make the heap bigger, edit your MemoryAnalyzer.ini file (it should be in your MAT

Python: Cannot replicate a test on memory usage

老子叫甜甜 提交于 2019-12-05 11:46:59
I was trying to replicate the memory usage test here . Essentially, the post claims that given the following code snippet: import copy import memory_profiler @profile def function(): x = list(range(1000000)) # allocate a big list y = copy.deepcopy(x) del x return y if __name__ == "__main__": function() Invoking python -m memory_profiler memory-profile-me.py prints, on a 64-bit computer Filename: memory-profile-me.py Line # Mem usage Increment Line Contents ================================================ 4 @profile 5 9.11 MB 0.00 MB def function(): 6 40.05 MB 30.94 MB x = list(range(1000000))

VSP2340 Environment variable issues suddenly when profiling an app

柔情痞子 提交于 2019-12-05 10:18:54
问题 Can anybody explain why i'm suddenly getting this when trying to do any kind of performance profiling (the same way i always have) from within VS2012. VSP2340: Environment variables were not properly set during profiling run and managed symbols may not resolve. Please use vsperfclrenv before profiling. I've googled and tried a few things, but i'm unable to find out how to get this working from within VS2012 again. I found somebody with the same unanswered issue a couple of weeks back here:

Dispose StreamResourceInfo.Stream

笑着哭i 提交于 2019-12-05 07:29:27
I use StreamResourceInfo.Stream to get BitmapImage s from resources. Is it correct to Close and Dispose the stream after using it? I ask because in memory profiler, I get an error if I do so. Memory profiler says that a disposed instance has not been GCed. If I look on the web, I only can find this post to this topic. In this post, the responding person says, that it is meaninfull to dispose. However if I look at the circumstances and on the effect, I don't think that this is right. Does someone know what is the right action? Additional information: In the msdn examples I have seen, they don't

Memory profiling in R: how to find the place of maximum memory usage?

早过忘川 提交于 2019-12-04 15:02:38
My code eats up to 3GB of memory at a single time. I figured it out using gc() : gc1 <- gc(reset = TRUE) graf(...) # the code gc2 <- gc() cat(sprintf("mem: %.1fMb.\n", sum(gc2[,6] - gc1[,2]))) # mem: 3151.7Mb. Which I guess means that there is one single time, when 3151.7 MB are allocated at once. My goal is to minimize the maximum memory allocated at any single time. How do I figure out which part of my code is reposponsible for the maximum usage of those 3GB of memory? I.e. the place where those 3GB are allocated at once. I tried memory profiling with Rprof and profvis , but both seem to

How can I track down memory peaks? (That's peaks with a p, not an l.)

廉价感情. 提交于 2019-12-04 00:51:59
问题 I've got a kiosk app, which, essentially shows a bunch of slides with various bits of information on them. I initially began coding this over a year ago, when I was beginning with Objective-C and iOS development. I find that my code style is much cleaner now than what it was, and I'm much more experienced, so I've decided to rewrite from scratch. I ran my app with the Allocations instrument to see what the memory usage was. Considering that this is a kiosk app, everything needs to run

VSP2340 Environment variable issues suddenly when profiling an app

99封情书 提交于 2019-12-03 21:36:29
Can anybody explain why i'm suddenly getting this when trying to do any kind of performance profiling (the same way i always have) from within VS2012. VSP2340: Environment variables were not properly set during profiling run and managed symbols may not resolve. Please use vsperfclrenv before profiling. I've googled and tried a few things, but i'm unable to find out how to get this working from within VS2012 again. I found somebody with the same unanswered issue a couple of weeks back here: VS2013: "VSP2340: Environment variables were not properly set" even when running from IDE Thanks in

Set tracking traits of template class in boost serialization to reduce memory consumption

好久不见. 提交于 2019-12-03 21:12:41
As this link stated for defining traits for a template class we should define it manually or we extract our class from the trait class. But I want to make this process automatically, for this reason inspired from BOOST_CLASS_TRACKING I wrote the blow code: #include<boost/preprocessor/tuple/enum.hpp> ... #define FOO_CLASS_TRACKING(E, PARAMETER_TUPLE, ...) \ namespace boost { \ namespace serialization { \ template<BOOST_PP_TUPLE_ENUM(PARAMETER_TUPLE)> \ struct tracking_level< __VA_ARGS__ > \ { \ typedef mpl::integral_c_tag tag; \ typedef mpl::int_< E> type; \ BOOST_STATIC_CONSTANT( \ int, \

How to take heap snapshot of Xamarin.Android's Mono VM?

偶尔善良 提交于 2019-12-03 05:20:15
问题 Background: I am trying to track down a memory leak in a Xamarin.Android app. Using DDMS and Eclipse Memory Profiler, I am able to see which objects are alive. When trying to track what is holding them alive (GC Root), I only see "Native stack" (of course). How can I take a heap snapshot of the MONO VM? So I can later use it with i.e. heapshot tool? Or are there ANY OTHER TECHNIQUES I can use to find what is holding an object alive in Xamarin.Android's .NET part? Is it possible to do