computer crashing when running larger data, memory problem?

I am using lapack/blas implementation for my matrix operations (that operates in fortran). The rest of my code is just allocating and de-allocating memory blocks for the matrices. I need to loop through my data sets many iterations to compute my final product. So far it works for 200 runs but the computer freezes for 500 runs. Would anyone know what is the problem or where I can read up about this? People I have talked to think it's a memory-type problem but I've been careful to always free up the memory I use within a function/ loop. So is it my code or because of the lapack library? Hopefully someone can point me in the right direction. Thanks