> Program memory is copied, not function memory stack, even when fork is called from within a function?
Wrong way round.
The program memory (being read-only) has no need to be copied.

All the data (global data, heap memory, stack) MAY be copied at the time of the fork(), but in practice the copying only takes place when either of the new processes does a memory write. This approach saves a considerable amount of time in the case where the only thing the child does it call exec().

Calling fork() in a function doesn't matter.