You should be using the Adobe Media Encoder to render h.264. There are maybe even hundredsd of posts on this.
We don't know anything about your project. H.264 can only be used for specific frame sizes. That could be a problem. We don't know anything about the effects being used. We don't know how long the project is? There are too many unanswered questions to do anything but guess.
Rick is right about the Media Encoder. As well as you might want to turn off your firewall and AV when rendering. It will speed you up.
A laptop is usually pretty small, unless it is a MacBook Pro designed for traveling editors.
Whenever you are trying to get help with your specs or troubleshoot you really got to tell us ALL the specs. Ram, video card, screen shots of your errors, etc. There are some really sharp guys on here, if you give the right info most of the time you can get a straight helpful answer...
We need a lot more info about your project. Renders stopping halfway through has usually nothing to do with the output format, so for the time being let's ignore the theoretical hubub about H.264 . Instead tell us what source footages are involved, what effects, what specific animation. Could well be that at the point where it stops source footage is damaged or a specific, resource-dependent effect kicks in like an OpenGL based one (Optical Flares, Element, MB Looks or whatever) and this fails. Also tell us, whether you use MP rendering or not, as similalrly, some effects may just not be compatible with it.
We need to know a lot more if we're going to help you. Please provide answers to the questions listed here: "FAQ: What information should I provide when asking a question on this forum?"
> Renders stopping halfway through has usually nothing to do with the output format, so for the time being let's ignore the theoretical hubub about H.264
If the format being used is H.264 in a QuickTime container, this can be a problem, since that codec does have problems with the use of many threads, and these problems often occur partway through processing. There is more information about this here.