I have a similar problem, only my issue pertains to my internal drive.
I have been searching for a solution for about 5 hours and have tried just about everything, but have not found a concrete solution. I have attempted both the prescribed solutions in this topic as well as at least a dozen others, and I have seen a lot of promise but not like I previously reported, not very many results.
Not to spawn a new thread inside of this one, but let me describe my situation.
I opened my MBP to wake it from sleep mode when I woke up this morning, and it pinwheeled at my password authentication screen. After waiting 10 minutes for this to subside, I closed my laptop, waited 5 minutes, and tried to wake it up again. This time, after 5 minutes my computer allowed me to authenticate my password, and I was capable of opening disk utility and immediately repaired disk permissions on my hard disk (I have been having to do that when I turn my computer on in order to prevent it from locking up almost since i received the product).
Anyway, my computer locked up again after the permissions repair completed, and I needed to do a hard shut down. After the hard shut down I was unable to boot into neither OS X nor Windows.
This being suspicious, I grabbed my Snow Leopard install disk and booted with that. I opened Disk utility and was unable to repair my Macintosh HD.
After that, I followed the instructions that Disk Utility gave me and attempted to erase and reformat my Macintosh HD drive, but received the error,
"Posix reports: the operation couldn't be completed. Cannot allocate memory."
So, in response to that, My attitude was, "I have everything backed up, ill just erase the whole drive and restore, or reinstall everything" So, I attempted to repartition the disk so it would have only one partition. I was given the error,
"Posix reports: the operation couldn't be completed. Cannot allocate memory."
After this happened, I decided to attempt to erase the whole volume, and was shown the error
"Posix reports: the operation couldn't be completed. Cannot allocate memory."
After THAT happened, I used terminal to zero the drive, but have been unable to repartition or create a partition map for the drive because I keep getting the error,
"Posix reports: the operation couldn't be completed. Cannot allocate memory."
In terminal the error is not Posix, but still reports that it "Cannot allocate memory" after 60% of the way through formatting.
I cannot figure out my problem. I am half way considering buying a new drive..
Does anyone have any solutions??