In this chapter, we are going to learn about the different functions that are used when performing different tasks. We will learn how to register functions that execute automatically when a program terminates. We will learn about functions that measure the clock ticks and CPU seconds required for the execution of certain tasks. We will also learn how to allocate memory at runtime, and then free it up when its task is over. Finally, we will learn how to handle different signals.
In this chapter, we will dive into the following recipes:
- Registering a function that is called when a program exits
- Measuring the clock ticks and CPU seconds required in the execution of a function
- Performing dynamic memory allocation
- Handling signals
However, before we proceed, a small introduction to dynamic memory allocation and some related functions is in order...