OOP inheritance and memory

My question concerns memory usage.
A base class contains a method baseFunc().
Three further classes are inheriting from the base class.

When a program instantiates the three further classes, what about memory usage:
Will there be three times baseFunc() in memory?
Or will there be only one baseFunc() in memory?

No specialist but I think (!!) that baseFunc will become a pointer to the actual baseFunc() function.

When you override the function in one of the derived classes, the pointer will be changed to point to the new baseFunc() function.

No and no. Virtual and polymorphic function calls are handled through vtables and a hidden "this" pointer added to the function's parameter list.

A bit more info

The compiler places member functions like baseFunc() in a single location in the program’s code (text) segment. This means the function’s machine code exists once in the executable.

When you create objects of the derived classes, the compiler allocates memory only for their instance data (member variables), not for the functions.

At runtime, calling baseFunc() involves using the object’s address (this pointer) passed implicitly to the function, but the actual code executed is the single shared copy stored in memory.

Because the function code does not depend on each object’s memory layout, it does not need to be duplicated per instance. This saves memory and keeps the program efficient.