memory-leaks

Haskell: how to detect “lazy memory leaks”

霸气de小男生 提交于 2020-05-10 03:26:27
问题 After few hours of debugging, I realized that a very simple toy example was not efficient due to a missing ! in an expression return $ 1 + x (thanks duplode!... but how come ghc does not optimize that??). I also realized it because I was comparing it with a Python code that was quicker, but I won't always write Python code to benchmark my code... So here is my question: is there a way to automatically detect these "lazy memory leaks", that slow down a program for no real reason? I'm still

Leak canary, Recyclerview leaking mAdapter

試著忘記壹切 提交于 2020-05-09 18:16:27
问题 I decided it was high time I learned how to use Leak Canary to detect Leaks within my apps, and as I always do, I tried to implement it in my project to really understand how to use the tool. Implementing it was easy enough, the difficult part was reading what the tool is throwing back at me. I have a scrollview that seems to accumulate memory in the memory manager as I scroll up and down (even though It doesnt load any new data) so I thought that was a good candidate object to track leaks on

Django memory usage going up with every request

我只是一个虾纸丫 提交于 2020-05-09 17:47:53
问题 I moved my first Django project from DjangoEurope to Webfaction, and that started an issue looking like a memory leak. With every single request memory usage of the server process goes up about 500kb. It never goes down. This goes on until Webfaction kills it for using too much memory. I can clearly see this when I refresh the Django's admin interface in my browser (although this happens with every single page, not only with admin interface - I though admin interface would be a nice test case

PHP Fatal error allowed memory size exhausted

感情迁移 提交于 2020-05-09 04:55:53
问题 I'm writing a codeigniter application, upon doing a query i get hit with the following fatal error. Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /var/www/html/cryd/_zcore/core/Loader.php on line 262 I could increase the allowed memory size, but it seems that the issue could be much more graver, that if it is a memory leak, i'd just be giving php more memory to play around with. The query is not even that intensive, it just returns one row

PHP Fatal error allowed memory size exhausted

南楼画角 提交于 2020-05-09 04:51:11
问题 I'm writing a codeigniter application, upon doing a query i get hit with the following fatal error. Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /var/www/html/cryd/_zcore/core/Loader.php on line 262 I could increase the allowed memory size, but it seems that the issue could be much more graver, that if it is a memory leak, i'd just be giving php more memory to play around with. The query is not even that intensive, it just returns one row

Memory leak when logging complex objects

本秂侑毒 提交于 2020-05-08 03:05:02
问题 I am currently busy writting a javascript library. In that library I want to provide some logging about what is going to the console. function log () { if ((window && typeof (window.console) === "undefined") || !enableLogging) { return false; } function currentTime() { var time = new Date(); return time.getHours() + ':' + time.getMinutes() + ':' + time.getSeconds() + '.' + time.getMilliseconds(); } var args = []; args.push(currentTime()); for (var i = 1; i < arguments.length; i++) { args.push

How to force NVIDIA OpenCL to release GPU context to avoid memory leak

旧街凉风 提交于 2020-04-18 05:47:49
问题 This is a follow up question to an earlier question. From the discussion, the mmc code (https://github.com/fangq/mmc) appears to be fine, and the memory was properly released when running on Intel CPU and AMD GPU. However, on NVIDIA GPU, valgrind reported significant memory leak, so was the test. Every time after a cycle of creating and releasing a GPU context, the memory kept increasing. You can see this result in the below memory (blue line) profiling report. Here is the test and commands

How to destroy a dialog fragment completely for memory leak issue?

泪湿孤枕 提交于 2020-04-16 04:53:12
问题 I Have a empty dialog fragment. For get memory leak issue, I Add LeakCanary library to my app. When open dialog fragment with this commands: DialogFragment fragment = TabsFragment.newInstance(); fragment.setStyle(DialogFragment.STYLE_NO_FRAME, R.style.DialogFragments); fragment.show(getSupportFragmentManager(), "MyFragment"); and close it, LeakCanary show me this Error: ScreenShot I try and add setRetainInstance in OnCreate method and view = null in onDestroyView . But that memory leak error

Spyder does not realease memory for matplotlib plots

▼魔方 西西 提交于 2020-04-11 16:13:23
问题 I use Spyder 3.3.6, with Pyhton 3.7.3 over IPyhton 7.7.0 cosole. For different reasons, Spyder has always been my IDE of choice, but now I have decided to drop it altogether and stick to command prompt only. The reason is that I have seen a serious memory leak while using matplotlib which is caused by Spyder. Memory increases linearly until all my 128 GB of memory is consumed to the extend that my Ubuntu machine halted completely and I had to hard reset it. I have had this issue in the past

Spyder does not realease memory for matplotlib plots

孤街醉人 提交于 2020-04-11 16:11:45
问题 I use Spyder 3.3.6, with Pyhton 3.7.3 over IPyhton 7.7.0 cosole. For different reasons, Spyder has always been my IDE of choice, but now I have decided to drop it altogether and stick to command prompt only. The reason is that I have seen a serious memory leak while using matplotlib which is caused by Spyder. Memory increases linearly until all my 128 GB of memory is consumed to the extend that my Ubuntu machine halted completely and I had to hard reset it. I have had this issue in the past