Add memory allocation monitoring