Questions tagged [low-memory]

101 questions
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…
Sedate Alien
  • 10,572
  • 6
  • 35
  • 57
26
votes
8 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 MiB (GPU ; GiB total capacity; GiB already allocated; MiB free; cached) I want to research object detection…
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
22
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
  • 841
  • 3
  • 12
  • 25
16
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,333
  • 7
  • 34
  • 56
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,492
  • 30
  • 34
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,517
  • 1
  • 20
  • 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
  • 421
  • 4
  • 13
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
  • 957
  • 9
  • 14
9
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
  • 6,536
  • 7
  • 50
  • 104
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
  • 4,674
  • 5
  • 26
  • 45
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,040
  • 22
  • 74
  • 121
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,366
  • 5
  • 19
  • 34
6
votes
2 answers

How to force Windows to send 'LOW_MEMORY' signal to all applications?

I'm working on some "free RAM" tool that has to force windows to send 'LOW_MEMORY' signal to all applications (that asks all application to free their unused data, SQL server and file caches get cleared so you'll end up with lots of extra free…
PolGraphic
  • 2,941
  • 9
  • 39
  • 100
6
votes
6 answers

Reasons for putting C/C++ variables in an unnamed scope?

Possible Duplicate: Can I use blocks to manage scope of variables in C++? I came across some C++ code that resembled: int main(void) { int foo; float qux; /* do some stuff */ { int bar; bar = foo * foo; qux =…
John Carter
  • 6,084
  • 2
  • 26
  • 49
1
2 3 4 5 6 7