Functions are always in memory, but not on the stack. They are part of the code loaded with the rest of the program, and are put in a special read-only segment of memory.
When you call the function, then space for its local variables (including arguments) are reserved on the stack.