Levi H
Levi H

Reputation: 3586

Insufficient memory error at only 1.7gb memory usage?

I've got a program in xna and I'm loading up 2gb+ of data (not a problem, it's meant to). It works fine at anything below 1.7gb but as soon as it goes over that it'll throw this.

"Insufficient memory to continue the execution of the program."

Or another time I had

"Insufficient memory to continue the execution of the program."

I've got 8gb of ram and my GPU has 2gb. My system definitely isn't running out of memory as I can load up other programs with very high memory usage and it'll still end at 1.7gb. Is there a fix to this?

Upvotes: 0

Views: 4138

Answers (3)

Joh
Joh

Reputation: 2380

See Tim's comment on this answer. I have observed the same limitations. As XNA on windows is limited to 32-bit processes, loading that much data (2gb) is pretty much impossible.

Upvotes: 2

James Manning
James Manning

Reputation: 13579

1) it's most likely running 32-bit (you can run taskmgr and be able to tell)

2) even if there's enough free memory to satisfy a request, there may not be enough contiguous free memory. memory fragmentation becomes an issue as you start running out of the virtual memory space for a process.

There's a good article that includes these (and other) issues:

Investigating Memory Issues

Upvotes: 2

itsme86
itsme86

Reputation: 19496

Are you storing all that data in one object? You might be running into a CLR limitation.

Check out this post: CLR object size limitations

Upvotes: 2

Related Questions