Malloc error

Discussion in 'Mac Apps and Mac App Store' started by kclark, Jul 4, 2011.

  1. kclark macrumors member

    Joined:
    Feb 16, 2011
    #1
    I have the following error in my console messages when I have a particular app to close unexpectedly.

    "My Program(243,0xa07dc540) malloc: *** mmap(size=16777216) failed (error code=12)
    *** error: can't allocate region
    set a breakpoint in malloc_error_break to debug."

    How can I fix this. I did do a search, but no instructions on how to fix.
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    How much memory are you trying to malloc? Are you in 32 or 64 bit mode?
     
  3. kclark thread starter macrumors member

    Joined:
    Feb 16, 2011
    #3
    I am dumb when it comes to this. My first mac and it is a mini. It has 8 GB of memory. It is a Core 2 Duo, so according to this it is 64 bit.
     
  4. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #4
    That means it's capable of running 64 bit code. That does not necessarily mean you are running in 64 bit mode. And you still have not answered the question as to how much memory you are trying to malloc.
     
  5. kclark thread starter macrumors member

    Joined:
    Feb 16, 2011
    #5
    I don't know what that means. I had the memory upgraded to 8 GB and I am running a single program that I installed and that is it. The program shuts down and I look at the console and see the above error message. I don't know anything about malloc. When I looked at the logs for the first time is when I saw the word malloc for the first time.
     
  6. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #6
    You are memory mapping a file (mmap). This will allocate a large or even huge chunk of memory. This is failing for some reason. The most likely reason is that you are trying to allocate more memory than you can address. if you cannot answer the simple question "how much memory are you trying to allocate" then I'm very worried that you are writing code. Have you run the code in the debugger? In instruments?
     
  7. kclark thread starter macrumors member

    Joined:
    Feb 16, 2011
    #7
    I am not writing code. I am running a digital sign program, Media Sign Pro. It is displaying 4 images and 4 text boxes and that is it.
     
  8. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #8
    Then there is absolutely nothing you can do about this. You need the source code and programming experience. Contact the developers.
     
  9. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #9
    You should have said this in your original post. You should also have said that it's not your program, and you aren't doing any programming. You're just trying to find why Media Sign Pro is crashing with a malloc error.

    When you post in the Mac Programming forum, as the original post was, you should expect that people will assume you're programming, when not given any other details. Since you didn't give any other details, everyone did assume it was your program, and you wrote it. We can't see your computer and we can't read your mind. If you don't tell us exactly what you're doing, all we can do is make guesses or make assumptions.

    I have asked that this thread be moved to another forum, since it has nothing to do with programming on the Mac.
     

Share This Page