QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: Unseen Machine on July 02, 2020, 05:05:30 am

Title: Out of memory!!!
Post by: Unseen Machine on July 02, 2020, 05:05:30 am
Hi folks,

So i've been working on my Quake 3 level loader. I finished the loading code and figured i'd see how badly i've messed up so i hit F5 and ding! OUT OF MEMORY Error! So my question is, is that a memory limitation of QB64 or of my pc? (I only have a gig or ram so i expect it's me).

Unseen
Title: Re: Out of memory!!!
Post by: SMcNeill on July 02, 2020, 05:29:56 am
I've ran QB64 with a 12GB database loaded into a memblock in the past, so that shouldn't be the problem.

I'd check for a memory leak somewhere, unless the resource files are just too large for the PC completely.
Title: Re: Out of memory!!!
Post by: Qwerkey on July 02, 2020, 06:26:58 am
... unless the resource files are just too large for the PC completely.
Coo, if that's the case what sort of files are you loading, Unseen??
Title: Re: Out of memory!!!
Post by: Unseen Machine on July 02, 2020, 08:50:50 am
Quote
'd check for a memory leak somewhere,
Oh, so trying to allocate memory with a negative number is a bad thing! Who'd have known eh!? (I feel silly now!)

Seems that using integers instead of long's caused the problem! Now it loads all the data without issue, i've just gotta figure out how to render it all now!

Quote
Coo, if that's the case what sort of files are you loading, Unseen??
Fortunately it's not the case, but as you asked i'm loading .bsp files...or at least i'm trying to load them!

Thanks folks (Steve)

Unseen
Title: Re: Out of memory!!!
Post by: Pete on July 02, 2020, 11:44:02 am
Sorry I'm late to the party. Once, by mistake, I set up  situation, which resulted in a negative DIM. I'm glad I found it quickly, before tearing out what was left of my hair. IN my case, the program would simply crash. I started removing portions, until I discovered where the crash was occurring. It took about five tries, and then I found a situation that resulted in a negative DIM. Yeah, QB64 HATES those varmints. it just spins through memory, until it's exhausted.

Pete