Questions tagged [low-memory]
111 questions
145
votes
21 answers
How to avoid "CUDA out of memory" in PyTorch
I think it's a pretty common message for PyTorch users with low GPU memory:
RuntimeError: CUDA out of memory. Tried to allocate X MiB (GPU X; X GiB total capacity; X GiB already allocated; X MiB free; X cached)
I tried to process an image by…

voilalex
- 2,041
- 2
- 13
- 18
39
votes
6 answers
Memory-mapped files and low-memory scenarios
How does the iOS platform handle memory-mapped files during low-memory scenarios? By low-memory scenarios, I mean when the OS sends the UIApplicationDidReceiveMemoryWarningNotification notification to all observers in the application.
Our files are…

Aidan Steele
- 10,999
- 6
- 38
- 59
26
votes
7 answers
Android : Static variable null on low memory
I have an application which has some static variables.
These variables are stored in an independent Class named DataContext.
These variables are initialized from raw files at the application start (a method named DataContext.initConstant() is called…

MathieuC
- 271
- 1
- 3
- 6
23
votes
4 answers
Chrome mobile browser memory error when upload file
Hi,
Is it possible to create a custom file upload to prevent chrome's unable to complete previous operation due to low memory error"?
It works perfectly on the desktop version of chrome. Actually I use an input type="file" control and I got this…

L.Grillo
- 960
- 3
- 12
- 26
17
votes
3 answers
How to force a service restart?
I have a background service that sometimes gets killed by the OS when it is running low on memory.
How to simulate this behaviour so I can debug it?
The dev guide simply says "if your service is started, then you must design it to gracefully…

Eric Chen
- 3,562
- 7
- 39
- 58
14
votes
1 answer
How to exclude devices with low RAM in Google Play Store?
I would like to distribute my first Android app via the Google Play Store.
However, I want my app to be installed on devices with at least 512 MB of RAM since devices with low memory can crash the app.
It is impossible to find the RAM of each device…

Ram Kumar
- 828
- 2
- 10
- 27
13
votes
6 answers
What's an efficient implementation of Conway's Game of Life for low memory uses?
I'm looking for a fast and memory efficient approach for implementing Conway's Game of Life.
Constraints: a 96x128 board, approximately 2kB RAM available and 52MHz processor (see the tech specs here: http://www.getinpulse.com/features).
My current…

tlrobinson
- 2,812
- 1
- 33
- 35
13
votes
1 answer
NodeJS in-memory cache with memory pressure awareness
I'm coming from Java world, and there are plenty implementations of (local) in-memory caches. Moreover in Java world there are SoftReference and WeakReference, and they're, by definition, ideal for cache implementation(s).
I know that JavaScript…

Tomo
- 6,847
- 1
- 22
- 32
12
votes
4 answers
iOS app runs out of memory without receiving a low memory warning
I have an existing app that I made some recent changes to and I have been testing those changes. The app works perfectly fine on every iPad I test it on (iOS 4 and iOS 5). After loading several (50+) image-heavy views in my app I get a low memory…

Greg G
- 461
- 4
- 14
12
votes
1 answer
How to compile ruby with RVM on a low memory system?
rvm install 1.9.3
leads to the error in the make.log:
...
compiling ./enc/trans/emoji_sjis_docomo.c
compiling ./enc/trans/emoji_sjis_kddi.c
gcc: internal compiler error: Killed (program cc1)
gcc: internal compiler error: Killed (program cc1)
gcc:…

marc
- 977
- 9
- 14
8
votes
9 answers
Run my application in a simulated low memory, slow CPU environment
I want to stress-test my application this way, because it seems to be failing in some very old client machines.
At first I read a bit about QEmu and thought about hardware emulation, but it seems a long shot. I asked at superuser, but didn't get…

dario_ramos
- 7,118
- 9
- 61
- 108
8
votes
1 answer
Compact alternatives to Java ArrayList
I need to store a large dictionary of natural language words -- up to 120,000, depending on the language. These need to be kept in memory as profiling has shown that the algorithm which utilises the array is the time bottleneck in the system. (It's…

Mohan
- 7,302
- 5
- 32
- 55
7
votes
1 answer
How to cause onLowMemory on device for tests
I want to test our app for low memory cases.
Do you have any ideas, how to cause onLowMemory on devices?
Thank you.

Tima
- 12,765
- 23
- 82
- 125
7
votes
3 answers
Detect memory exhaustion in the browser before it crashes
When a JavaScript client application uses too much memory, the browser will either crash or throw an exception that can't be recovered from or swap like it's the 80s.
Do browsers signal that they almost reached the available memory limit for a…

Warren Seine
- 2,311
- 2
- 25
- 38
6
votes
0 answers
how to fix web app low memory crashes on mobile safari
Our web app is generating LowMemory crashes very often on Ipad and Iphone.
This is an example from CrashReporter
Incident Identifier: 858042
CrashReporter Key: 6bda3a
Hardware Model: iPad1,1
OS Version: iPhone OS 5.0.1 (9A405)
Kernel…

Tom Fishman
- 1,716
- 6
- 22
- 36