Skip to content

Instantly share code, notes, and snippets.

@celso
Last active December 11, 2015 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save celso/4525824 to your computer and use it in GitHub Desktop.
Save celso/4525824 to your computer and use it in GitHub Desktop.
Strategies to compile stuff on low memory
A useful recipe for Raspberry Pi hackers
CFLAGS="$CFLAGS --param ggc-min-expand=0 --param ggc-min-heapsize=8192"
Change 8192 to, say, 131072 to use more memory. Ie:
Also, remove “-pipe” from your CFLAGs. Slows down compile but uses less memory.
Also, check the -O option. Sometimes -O2 or -O3 required lots of memory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment