When squid crashes it creates core log files which at some point fill the disk completely. I wanted to know if there's a way to limit the creation of the files.
You can use the "ulimit" program to limit the creation of core files, also there are ways to disable cores on a system completely (i believe this is default on many distros?)
Having said that, I would have thought that you are solving a symptom here, you need to be looking at solving the problem of squid crashing often - unless for some reason having squid crash is part of the plan? Squid is pretty stable, what are you doing to it that's causing regular crashing? What version of squid are you running - try moving to the latest of the 2.7 series if you're on 2.x, or even down to that if you're on 3.x but not using 3.x features.