In Intel Guide for Developing Multithreaded Application, p.57, the use of two functions: kmp_malloc and kmp_free is recommended. These functions maintain a per-thread heap attached to each thread utilized by OpenMP and avoid the use of the lock that protects access to the standard system heap.
Unfortunately, no example of the use of kmp_malloc and kmp_free functions was given.
Please, present an example of a dummy Fortran code, where these functions are used.