I know the threshold memory (after which app crashes) depends on the RAM of the device but does it depend on the higher iOS version with older hardware.
I changed the OS version in my 3GS from 4.3 to 5.0.1. Does it affect the maximum memory usage limit of a running app in the foreground.
Since this “maximum memory usage limit” is very likely not constant at all, I don’t think your question makes a lot of sense. For example, the OS probably has a different memory threshold for killing the foreground app at a time when a phone call is coming in and you are streaming audio in Safari in the background than during a time when the rest of the device’s system are idle.
That said, it’s almost certain that different OS version have different memory requirements for their own services. Whether newer OSes require less (because of optimizations on Apple’s side) or more (because of new OS features) memory is anyone’s guess. I’d guess the latter in most cases.