Memory plays a role, but it is only a factor. There are numerous other factors as well and cataloguing them all and their relative influence is where the difficulty arises.
But a thorough discussion of "intelligence" is a major topic at least as grand as a discussion of "knowledge"..
* Abstract thinking/reasoning
* Capacity to acquire knowledge
* Ability to solve problems
I would argue that these three are different facets of the ability to perceive patterns, to wit:
Abstract thinking/reasoning : the ability to conjure new patterns by merging existing patterns;
Capacity to acquire knowledge: the ability to catalog facts by application of patterns of information; and
Ability to solve problems: The ability to apply patterns to real situations and correctly extrapolate future system responses based on adherence to those patterns.