damn, 512M!!! that's a bit too much, you could try to fill up empty space in different arrays.