Your app is making more calls to malloc when there is memory being used by disk cache, or you mean something else by "millions upon millions of calls for more memory"?
You control hope many times you call malloc. Just call it once with what you need.
You control hope many times you call malloc. Just call it once with what you need.