Message 1 of 7
Memory Allocation - FATAL ERROR
Not applicable
09-12-2011
04:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello All,
I've written a simple ARX utility that does nothing but allocate and free a block of memory off the heap.
It uses the C++ new and delete operators, and successively increases the size of the block 1MB at a time, running until AutoCAD crashes.
AutoCAD crashes after allocating 83MB of memory. "FATAL ERROR: Out of Memory - Shutting Down"
Test environment: AutoCAD 2011 on XP (Win32) with 3GB of memory (1.85GB physical RAM available).
Here is the C code:
for (int i = 0; i < 1000; i++)
{
int len = i * 1000000;
char* buffer = new char[len];
if (buffer) delete []buffer;
}
Any insights?
Best,
Roger