Author Topic: Out of memory!!!  (Read 3532 times)

0 Members and 1 Guest are viewing this topic.

Offline Unseen Machine

  • Forum Regular
  • Posts: 158
  • Make the game not the engine!
    • View Profile
Out of memory!!!
« 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

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Out of memory!!!
« Reply #1 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.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Re: Out of memory!!!
« Reply #2 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??

Offline Unseen Machine

  • Forum Regular
  • Posts: 158
  • Make the game not the engine!
    • View Profile
Re: Out of memory!!!
« Reply #3 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

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Out of memory!!!
« Reply #4 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
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/