Modular verification of equivalence for memory allocating procedures