Discussion:
Memory allocation problem
(too old to reply)
Hans Balsam
2009-03-29 03:02:39 UTC
Permalink
Dear all,

First of all, I'm a newbie here (and to Macs) - so maybe
I'm asking in the wrong forum. Just let me know if this
is the case.

I'm running a program called "Function" on a Mac computer.
For variable of small range the program is working fine.
But entering a larger range I'm facing memory problems.
To be concrete, I obtain the following messages (which I don't fully
understand as I'm usually not a mac user):

Function(21411) malloc: *** vm_allocate(size=1134858240) failed (error
code=3)
Function(21411) malloc: *** error: can't allocate region
Function(21411) malloc: *** set a breakpoint in szone_error to debug
terminate called after throwing an instance of 'std::bad_alloc'
what(): St9bad_alloc
Abort trap


So it looks like a memory issue.
Do you know how I can increase the memory to make the program
run?

Please let me know whether you need more information to give
me advise.

Thank-you!
Daniel T.
2009-03-30 00:37:26 UTC
Permalink
Post by Hans Balsam
First of all, I'm a newbie here (and to Macs) - so maybe
I'm asking in the wrong forum. Just let me know if this
is the case.
I'm running a program called "Function" on a Mac computer.
For variable of small range the program is working fine.
But entering a larger range I'm facing memory problems.
To be concrete, I obtain the following messages (which I don't fully
Function(21411) malloc: *** vm_allocate(size=1134858240) failed (error
code=3)
So it looks like a memory issue.
Do you know how I can increase the memory to make the program
run?
Buy 1134858240 bytes of RAM? That is 1134858KB, or 1135MB. The fact that
the program is trying to use over a terabyte of RAM is a good clue that
the program itself is broken.
Post by Hans Balsam
Please let me know whether you need more information to give
me advise.
Contact the author of the program.
Paul Russell
2009-03-30 08:40:22 UTC
Permalink
Post by Daniel T.
Post by Hans Balsam
First of all, I'm a newbie here (and to Macs) - so maybe
I'm asking in the wrong forum. Just let me know if this
is the case.
I'm running a program called "Function" on a Mac computer.
For variable of small range the program is working fine.
But entering a larger range I'm facing memory problems.
To be concrete, I obtain the following messages (which I don't fully
Function(21411) malloc: *** vm_allocate(size=1134858240) failed (error
code=3)
So it looks like a memory issue.
Do you know how I can increase the memory to make the program
run?
Buy 1134858240 bytes of RAM? That is 1134858KB, or 1135MB. The fact that
the program is trying to use over a terabyte of RAM is a good clue that
the program itself is broken.
Not bad - you're only off by 3 orders of magnitude. ;-) It's just over 1
GB, not 1 TB. If this is a 32 bit app then allocations of this size can
be problematic due to the island caused by the loading of dylds.
Typically you only ever allocate just over 2 GB in a single allocation
in a newly launched app, and in the more general case you may well have
problems with any large-ish allocations, or when the total allocation
exceeds what's available in the 32 bit address space. All these problems
go away in 64 bit apps.
Post by Daniel T.
Post by Hans Balsam
Please let me know whether you need more information to give
me advise.
Contact the author of the program.
And ask him if he has a 64 bit version of his app.

Paul

Loading...