# Example This example demonstrates how to use standalone applications and the runtime support library (see [Runtime support library](https://docs.qualcomm.com/doc/80-N3040-23/topic/runtime-support-library.html)). Note The example program files are stored in the Hexagon tools installation folder in the directory, `Examples/StandAlone_Applications`. Mandelbrot is the example program provided with the Hexagon tools releases. It computes a fractal image and displays it using character graphics. The program is contained in the single file, `mandelbrot.c`, which includes the header file, `hexagon_standalone.h` that is used to access the runtime support library. To build the program, follow the instructions in the associated README file. When executed, the program performs the following steps: 1. It spawns multiple worker threads using the runtime support library function, `thread_create()`. The number of threads created depends on the Hexagon processor version being used. 2. Each worker thread independently computes one part of the fractal image. 3. After the computations are completed, one of the worker threads locks a mutex (using the library function, `lockMutex()`), and writes the computed fractal image into the image buffer. 4. The program’s master thread (thread 0) then displays the computed fractal image on the console and unlocks the mutex. 5. When the program finishes executing, the Hexagon simulator creates a file named `pmu_statsfile.txt`, which contains the simulation statistics information. Note Because the program executes on the simulator, it takes some time before the computations are completed and the fractal image is displayed. Last Published: Oct 06, 2026 [Previous Topic power\_vector\_unit()](https://docs.qualcomm.com/bundle/publicresource/80-N3040-23/topics/runtime-support-library.md) [Next Topic Application Binary Interface User Guide](https://docs.qualcomm.com/bundle/publicresource/80-N3040-23/topics/index_80-n2040-23_application_binary_interface_user_guide.md)