#14566 - dist0rted - Thu Jan 08, 2004 8:13 pm
I've compiled many GBA games in the past, but I just got DevKitAdv onto my mom's laptop and every time I try to compile with gcc it says, "Virtual Memory Exosted" and won't do anything.
What's going wrong?
_________________
All knowledge is good; only the way it is put to use is good or evil.
#14568 - torne - Thu Jan 08, 2004 8:21 pm
You don't have enough memory on the PC. Make the swap file bigger. GCC uses vast, titanic amounts of memory (I've had a single compile consume more than 400MB of ram before, with an 80kb source file).
#14585 - tepples - Thu Jan 08, 2004 10:51 pm
In GBA programming, the most likely cause of a GCC "Virtual memory exhausted" error message is trying to compile a huge pre-initialized C array. These often result when you convert a raw binary file to source code for a C array.
There exist two workarounds:- Use a binary file to assembly language converter (one that outputs .s). I've written one of those; e-mail me if you want source code and/or a win32 binary.
- Use appended data. Many users on this forum swear by my GBFS library for accessing appended data. However, appended data is not compatible with source-level debugging because it works only with binary images produced with objcopy, not with .elf files.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
Last edited by tepples on Sat Jan 10, 2004 1:08 am; edited 1 time in total
#14598 - MumblyJoe - Fri Jan 09, 2004 2:43 am
I had the same problem recently when trying to compile a massive file that had one huge array in it, in fact it was the whole of "Hey Ladies" by The Beastie Boys, and I ended up having to set my virtual memory maximum to 3GB (under WinXP) to get it to compile, and then it took an hour to do anyway. I was watching a memory monitor program while it was compiling and devkitadv used nearly all of that memory.
_________________
www.hungrydeveloper.com
Version 2.0 now up - guaranteed at least 100% more pleasing!
#14609 - johnny_north - Fri Jan 09, 2004 3:30 pm
In at least the R4 distribution of DKA for Windows, you must unpack and apply the winpatch archive (can't remember the exact name) after all of the other archives are unpacked in the the DKA directory. If it isn't unpacked and applied to the DKA directory last, compiling a project will result in the error you describe.