I am developing a program on Solana and also testing few aspects regarding how solana enforces checks on the bpf program. However, I am stuck with the issue that I am getting the error 'memory allocation failed, out of memory' which I believe is coming because I am exhausting the 32KB heap memory available in Solana however,I am not able to find the root where this error is being thrown. I have checked the complete Solana codebase, as well as the solana rbpf cli. However, haven't found anywhere that throws the above error specifically.
Any help would be appreciated. Thanks