well, ok, yeah, I did not notice it. But still, the usage per process is still an important part. And even if the leakage is real, it may happen in ZPM itself. The testing scenario does not look like proof much, installing and uninstalling zpm multiple times does not like a real scenario.

Have a look at what will show this query, the result in KB

echo 'select sum(memorypeak) memorypeak,sum(MemoryUsed) memoryused from %SYS.ProcessQuery' | iris sql iris

I think you forgot about memory per process, which I would say is not limited at all by default anymore. So, your "leaks", may happen in the processes. ZPM is quite a big package, and the installation will use multiple processes.

So, having most of the memory just mostly for buffers does not work for IRIS, while you need room for the processes, and if you would go to production, you have to have in mind how many active users you would expect and decide how much memory they will consume.

There is no way, to catch the possible issues for the previous version of IRIS.

The best case scenario is if you automate the build process, for instance with Docker, and test a compile stage on different versions of IRIS. But the ability to successfully compile may not prove that it will work, it would be better to have some unit tests, which will check it.

One more thing, may help, to check it, using the such tool as ObjectScript Quality, can help with checking System's API version. Where you can set the oldest supported version of IRIS, and during the scan, it can check if Methods are available in that particular version.