Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > malloc: vm_allocate crashes

malloc: vm_allocate crashes
Thread Tools
themexican
Junior Member
Join Date: Aug 2002
Location: Brooklyn
Status: Offline
Reply With Quote
Mar 21, 2005, 01:56 AM
 
My iphoto keeps crashing when I import with this error in the console:

*** malloc: vm_allocate(size=280117248) failed (error code=3)
*** malloc[1987]: error: Can't allocate region

Any ideas what's happening. Is this itunes or something with my vm?
( Last edited by themexican; Mar 21, 2005 at 02:59 PM. )
     
Maflynn
Professional Poster
Join Date: Mar 2002
Location: Boston
Status: Offline
Reply With Quote
Mar 21, 2005, 08:25 AM
 
Try posting this in the applications forum, you may get more hits.
     
theolein
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status: Offline
Reply With Quote
Mar 21, 2005, 10:42 AM
 
If malloc can't allocate memory, it could be a very good indication that your RAM is bad. On the other hand it is trying to allocate one huge amount of memory (approx 280 MB), so it could simply be that you either don't have enough memory or that your disk is full.
weird wabbit
     
themexican  (op)
Junior Member
Join Date: Aug 2002
Location: Brooklyn
Status: Offline
Reply With Quote
Mar 21, 2005, 12:32 PM
 
Hmm... weird. I have 3 gigs of RAM and many many gigs to spare on the hard disk. perhaps some of that ram is bad and iphoto is the only app that consumes enough RAM to touch it.

(I posted in apps and got 0 responses... also seems like this is more of a system thing).
     
bowwowman
Mac Elite
Join Date: Jun 2000
Location: If I tellz ya, then I gotsta killz ya !
Status: Offline
Reply With Quote
Mar 21, 2005, 12:34 PM
 
Those error codes indicate a lack of space for the swap files, and/or bad sectors on your HD where the VM system is attempting to write to.....

allocations of RAM and VM are different....
Personally I find it hilarious that you have the hots for my gramma. Especially seeins how she is 3x your age, and makes your Brittney-Spears-wannabe 30-something wife look like a rag doll who went thru WWIII with a burning stick of dynamite up her a** :)
     
barbarian
Senior User
Join Date: Apr 2001
Location: Palo Alto, CA
Status: Offline
Reply With Quote
Mar 21, 2005, 01:43 PM
 
any advice on testing for bad sectors
and is there a freeware ramtesting program?
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Mar 21, 2005, 02:12 PM
 
Originally posted by barbarian:
any advice on testing for bad sectors
If your machine is one that can boot OS 9, you can boot from an OS 9 CD, run Drive Setup, and run the "Test Disk" option. This does a scan for bad sectors that is pretty good. I don't know why Apple didn't include a bad sector check in the OS X version of Disk Utility.

If your machine isn't OS 9 bootable or you don't have an OS 9 CD, then TechTool Pro has a pretty good surface scanner. It's expensive, though.

and is there a freeware ramtesting program?
If you go with TTP, as I mentioned above, it also has a RAM test. If you want freeware, there's Rember, which is a wrapper around the open-source memtest program.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
arekkusu
Mac Enthusiast
Join Date: Jul 2002
Status: Offline
Reply With Quote
Mar 22, 2005, 04:01 PM
 
vm_allocate will also fail if the app's total ram usage exceeds 2 gigs (32-bit VM limit in Panther.)

How much memory was iPhoto using at the time?
     
Detrius
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status: Offline
Reply With Quote
Mar 22, 2005, 08:35 PM
 
Originally posted by arekkusu:
vm_allocate will also fail if the app's total ram usage exceeds 2 gigs (32-bit VM limit in Panther.)

How much memory was iPhoto using at the time?
32-bit would be 4GBs, would it not?
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
larkost
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Mar 22, 2005, 08:52 PM
 
Originally posted by Detrius:
32-bit would be 4GBs, would it not?
Yes, it would... if half the space were not reserved for system usage.
     
themexican  (op)
Junior Member
Join Date: Aug 2002
Location: Brooklyn
Status: Offline
Reply With Quote
Mar 24, 2005, 01:16 AM
 
These posts helped me troubleshoot. Many thanks. I have a pretty big iphoto lib. 24,000 pix all 6megapixel.

I had three problems:

1) unreferenced items in the database: fixed via a rebuild and then an empty of the trash
2) bad thumbnails 0K
3) a funky VM partition. It was even crashing techtool when techool was examining it. A clean wipe and zeroing reformat cleaned up that problem

Now knock on wood, no crashes
     
Detrius
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status: Offline
Reply With Quote
Mar 25, 2005, 08:00 PM
 
Originally posted by themexican:
...A clean wipe and zeroing reformat cleaned up that problem...
Ummm... did you try just a format before zeroing the data? If not, you may have lost all chances of verifying whether you had bad blocks.

Zeroing the hard drive is for privacy--not for bug fixing. The only time it ever fixes problems is if it successfully maps out a bad block. Therefore, if zeroing the volume makes a difference, you have a bad hard drive.

You people need to STOP recommending this as something that should be done with all formats, as it removes evidence of failing hardware!
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Mar 25, 2005, 08:14 PM
 
Don't all hard drives have bad blocks?
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Mar 25, 2005, 08:33 PM
 
Originally posted by Detrius:
Zeroing the hard drive is for privacy--not for bug fixing. The only time it ever fixes problems is if it successfully maps out a bad block. Therefore, if zeroing the volume makes a difference, you have a bad hard drive.

You people need to STOP recommending this as something that should be done with all formats, as it removes evidence of failing hardware!
I had a brand new hard drive once which wouldn't install OS X until I zeroed it. To my mind, if the presence of any bad blocks whatsoever meant the drive was failing, then the OS wouldn't remap those blocks automatically. As long as the bad blocks get remapped so you're not using them, you're probably fine.

Detecting failing hardware is what stuff like the S.M.A.R.T. tests are for.

Now, if more bad blocks keep showing up after you zero the disk...
( Last edited by CharlesS; Mar 25, 2005 at 08:39 PM. )

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
Sydney Tsai
Fresh-Faced Recruit
Join Date: Feb 2002
Location: Hong Kong
Status: Offline
Reply With Quote
Mar 25, 2005, 10:26 PM
 
I think you can try follow to see if your Harddisk is failling.

Open /Applications/Utilities/Disk Utilities.app

and select your boot disk and check if the SMART status.

If it's 'falling' or 'about to fail' you will need to replace your HD...

I hope it's not the Harddisk problem.
sydtsai
     
cmowat
Fresh-Faced Recruit
Join Date: Jun 2006
Location: Manila, Philippines
Status: Offline
Reply With Quote
Mar 27, 2006, 09:07 PM
 
Originally Posted by themexican
My iphoto keeps crashing when I import with this error in the console:

*** malloc: vm_allocate(size=280117248) failed (error code=3)
*** malloc[1987]: error: Can't allocate region

Any ideas what's happening. Is this itunes or something with my vm?
My iBook G4 is just 2 months old and while I was importing pics from my compact flash card in iphoto, I encountered a similar problem:
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000

I tried to run iphoto from the terminal and also got the following:
malloc: *** vm_allocate(size=3038732288) failed (error code=3)
malloc: *** error: can't allocate region
malloc: *** set a breakpoint in szone_error to debug
Bus error

I've tried reinstalling iphoto but keep getting the same problem. I tried accessing iPhoto from another user and it accessed fine. What does anyone recommend I do?
     
msuper69
Professional Poster
Join Date: Jan 2000
Location: Columbus, OH
Status: Offline
Reply With Quote
Mar 27, 2006, 10:25 PM
 
Originally Posted by Chuckit
Don't all hard drives have bad blocks?
I would hesitate to say ALL as absolutes are very rare in the real world. However, most hard drive have some bad blocks that are marked as such at the factory and remain hidden from normal OS level disk routines. And it's not necessarily an indicator that a hard drive is failing if a few more bad blocks occur during normal use. It's all a matter of degree. Too many bad blocks in a short period of time and your drive is probably going south. A few bad blocks over a few years is nothing to get excited about.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:37 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,