A
Anderas Broman
Hi,
I am developing a C# application for Windows CE. I have about 88 MB free
memory on my device, but I got some strange out of memory exceptions so I
decided to write a simple memory testing app that allocates memory until
this is no longer possible. This application can however only allocate about
24 MB before the memory allocation fails. (GC.GetTotalMemory)
Why is that?
Regards,
Andreas Broman
The memory allocation part of my test app:
*******************
using System;
using System.Collections;
namespace MemTestApp
{
public class AllocationManager
{
private Stack theMemBlocks = new Stack();
public void AllocateMemory( int size)
{
byte[] block = new byte[size];
theMemBlocks.Push( block);
}
public void DeallocateAllMemory()
{
while (theMemBlocks.Count > 0)
{
byte[] block = (byte[])theMemBlocks.Pop();
}
}
}
}
I am developing a C# application for Windows CE. I have about 88 MB free
memory on my device, but I got some strange out of memory exceptions so I
decided to write a simple memory testing app that allocates memory until
this is no longer possible. This application can however only allocate about
24 MB before the memory allocation fails. (GC.GetTotalMemory)
Why is that?
Regards,
Andreas Broman
The memory allocation part of my test app:
*******************
using System;
using System.Collections;
namespace MemTestApp
{
public class AllocationManager
{
private Stack theMemBlocks = new Stack();
public void AllocateMemory( int size)
{
byte[] block = new byte[size];
theMemBlocks.Push( block);
}
public void DeallocateAllMemory()
{
while (theMemBlocks.Count > 0)
{
byte[] block = (byte[])theMemBlocks.Pop();
}
}
}
}