www.delorie.com/gnu/docs/glibc/libc_24.html   search  
Buy the book!

The GNU C Library

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2.2 Unconstrained Allocation

The most general dynamic allocation facility is malloc. It allows you to allocate blocks of memory of any size at any time, make them bigger or smaller at any time, and free the blocks individually at any time (or never). Basic Memory Allocation  Simple use of malloc. Examples of malloc  Examples of malloc. xmalloc. Freeing Memory Allocated with malloc  Use free to free a block you got with malloc. Changing the Size of a Block  Use realloc to make a block bigger or smaller. Allocating Cleared Space  Use calloc to allocate a block and clear it. Efficiency Considerations for malloc  Efficiency considerations in use of these functions. Allocating Aligned Memory Blocks  Allocating specially aligned memory. Malloc Tunable Parameters  Use mallopt to adjust allocation parameters. Heap Consistency Checking  Automatic checking for errors. Memory Allocation Hooks  You can use these hooks for debugging programs that use malloc. Statistics for Memory Allocation with malloc  Getting information about how much memory your program is using. Summary of malloc-Related Functions  Summary of malloc and related functions.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003