Where to use inline functions ?

When a c/c++ program is executed. In RAM one block of memory will store the history of the function call. Whenever a function is called it will be stored in RAM when RAM does not have memory to store new function the last uncalled memory is cleared.

If a function is declared as inline then that function will remain in the RAM so that the allocating memory, removing and reallocating memory will not happen. So that it will reduce the time of execution and increase the processing speed.

At the same time when a function is declared as inline then it will only tell the compiler to tell that to keep it in RAM if it has memory. When RAM does not have memory to allocate then even a inline function will also be removed.

Also Read What is context switching.