memory_limit is the upper bound you "allow" PHP to allocate. You can allocate more than the available RAM, and have your OS swap or PHP crash.
Pretty much every shared host I had to work with (I've been freelancing for a few years), have been terrible, except for two platforms, both of them were expensive and aimed at particular PHP software.
Pretty much every shared host I had to work with (I've been freelancing for a few years), have been terrible, except for two platforms, both of them were expensive and aimed at particular PHP software.