Advertisement

Memory Management

  • Mikael Olsson
Chapter

Abstract

In the examples so far, the programs have only had as much memory available as has been declared for the variables at compile time. This is referred to as static allocation. If any additional memory is needed at runtime, it becomes necessary to use dynamic allocation. The C standard library provides several functions for managing dynamically allocated memory, including malloc, free, realloc, and calloc. These functions are found in the stdlib.h header file.

Copyright information

© Mikael Olsson 2019

Authors and Affiliations

  • Mikael Olsson
    • 1
  1. 1.Hammarland, Länsi-SuomiFinland

Personalised recommendations