Questions tagged [memory-fragmentation]

81 questions
5
votes
1 answer

Is it possible to solve CUDA memory fragmentation issue?

I'm trying to allocate some memory but sometimes get error "out of memory". cudaMemGetInfo says that available more memory that I need. So, problem in memory fragmentation. Is it possible to fix this problem? Is it possible to place elements in…
Robotex
  • 999
  • 5
  • 14
  • 34
5
votes
2 answers

.NET Heap fragmentation when using MSMQ async IO

I have an application that reads from large amount of MSMQ queues(about 10000 at the moment). I use queue.BeginPeek with UInt32.MaxValue timeout to receive message from queue. When the message appears in queue, I process it and call queue.BeginPeek…
struhtanov
  • 416
  • 2
  • 10
4
votes
3 answers

How to solve stringBuilder fragmentation?

I am getting a nice SystemOutOfMemory exception in my StringBuilders. It is not due to lack of ram, thus I believe it is memory fragmentation. I have ~200 StringBuiler objects. All of these are reused regularly (with strBldr.clear()). This seems to…
Automatico
  • 10,712
  • 7
  • 67
  • 106
4
votes
0 answers

What does it mean if totalMemory is small, but totalPss is very huge?

We have a problem with our app. Over time we have noticed that the totalPss value gets very large (depending on the device, it will be 300-700Mb): int pid = android.os.Process.myPid(); int pids[] = new int[1]; pids[0] = pid; …
4
votes
1 answer

How does iOS solve memory fragmentation?

I couldn't find any documentation about memory management of iOS. Especially about memory fragmentation. If you know any document about this, please let me know.
eonil
  • 75,400
  • 74
  • 294
  • 482
4
votes
0 answers

Can PerfView be used for finding source of fragmentation

I am finding PerfView to be very useful tool for determining root cause of various type of problems. However I am not sure if it can also be used to diagnose LOH fragmentation problem. I have collected a process memory snapshot using PerfView. In…
crazy novice
  • 1,617
  • 2
  • 14
  • 32
4
votes
1 answer

Much memory fragmentation with System.Threading.OverlappedData (async await)

I'm constantly running slowly out of memory. I've used WinDbg to have a look at the memory dump and this it what it looks like: 000007f975ee0630 557377 41027736 System.Object[] 000007f975f004d0 18781 47746604…
user1275154
  • 1,021
  • 1
  • 12
  • 21
4
votes
2 answers

Allowing heap allocating objects inside a short-lived scope to ensure freedom of memory fragmentation

We're using C++ in an embedded system environment and basically don't want any kind of dynamic memory allocation (see for example Resources for memory management in embedded application for the kind of reasons why we don't). Still we don't want to…
Roland Sarrazin
  • 871
  • 7
  • 23
4
votes
1 answer

C++: Does this look like memory fragmentation?

SUMMARY: I have an application which consumes way more memory that it should (roughly about 250% of the expected amount) but I can't seem to find any memory leaks. Calling the same function (which does a lot of allocations) will keep increasing…
jaho
  • 4,478
  • 4
  • 32
  • 64
3
votes
2 answers

Memory fragmentation when concatenating or adding strings but not with string.Format?

So a professor in university just told me that using concatenation on strings in C# (i.e. when you use the plus sign operator) creates memory fragmentation, and that I should use string.Format instead. Now, I've searched a lot in stack overflow and…
Gaspa79
  • 4,404
  • 2
  • 34
  • 59
3
votes
2 answers

How do I measure fragmentation in Hotspot's Metaspace?

I'm looking into debugging an "OutOfMemoryError: Metaspace" error in my application. Right before the OOME I see the following in the gc logs: {Heap before GC invocations=6104 (full 39): par new generation total 943744K, used 0K [...) eden…
mabi
  • 5,141
  • 1
  • 34
  • 70
3
votes
3 answers

What is using so much uncommitted "private data" on Windows Server 2003?

So I have a native C++ application, and it needs to keep track of lots of things over long periods of time. It's running out of memory when task manager says that the process reaches somewhere between 800 and 1200 MB of memory, when the limit…
2
votes
3 answers

Linux: how to check the largest contiguous address range available to a process

I want to enter the pid at the command line and get back the largest contiguous address space that has not been reserved. Any ideas? Our 32 bit app, running on 64 bit RHEL 5.4, craps out after running for a while, say 24 hours. At that time it…
johnnycrash
  • 4,674
  • 5
  • 29
  • 51
2
votes
1 answer

Why can a user-process invoke the Linux OOM-killer due to memory fragmentation, even though plenty of RAM is available?

I've got a headless ARM-based Linux (v3.10.53-1.1.1) system with no swap space enabled, and I occasionally see processes get killed by the OOM-killer even though there is plenty of RAM available. Running echo 1 > /proc/sys/vm/compact_memory…
Jeremy Friesner
  • 57,675
  • 12
  • 103
  • 196
2
votes
3 answers

extra-heap program memory consumption as showed by valgrind

My program use a lot of memory. This is what valgrind massif tool is showing me: -------------------------------------------------------------------------------- n time(i) total(B) useful-heap(B) extra-heap(B) …
Marko Kevac
  • 2,572
  • 24
  • 46