Thread: malloc failure - is there some way to allocate a bigger heap/whatever?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    161

    malloc failure - is there some way to allocate a bigger heap/whatever?

    I'm trying to allocate memory for a huge global array of structs, but it's apparently hitting some internal limit. Compiler (Dev-C/MinGW) wouldn't compile it with a default size set, and malloc after program load fails. What do I do to get access to more memory? I have 2 gigs of RAM, mostly free, so it shouldn't be an issue of physical memory.

    edit: I'm trying to cut down on the amount of memory I'll need. I'd still like to know some specifics about these limitations.
    Last edited by Viper187; 10-19-2008 at 01:44 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. malloc error can't allocate region on mac os X
    By simone.marras in forum C Programming
    Replies: 6
    Last Post: 02-28-2009, 05:59 AM
  2. Where does malloc() allocate to?
    By someprogr in forum C Programming
    Replies: 9
    Last Post: 09-06-2008, 06:10 PM
  3. Replies: 28
    Last Post: 12-10-2004, 06:49 AM
  4. conditions of failure... malloc that is...
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 12-08-2001, 06:47 PM
  5. How do I use malloc to allocate memory for a linked list?
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 09-14-2001, 01:02 PM