It seems you don't have enough RAM dedicated to Minecraft... Read the FAQ to know how to allocate more memory to Java.
i allocated 6 gigs to JAVA, i'm not sure I know how to make a .bat file
i have 9 gigs of RAM total
optifine is put on right, all my other t packs work
i just put the .zip file in the texture packs folder like i would any other