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).

3.2.2.1 Basic Memory Allocation  Simple use of malloc.
3.2.2.2 Examples of malloc  Examples of malloc. xmalloc.
3.2.2.3 Freeing Memory Allocated with malloc  Use free to free a block you got with malloc.
3.2.2.4 Changing the Size of a Block  Use realloc to make a block bigger or smaller.
3.2.2.5 Allocating Cleared Space  Use calloc to allocate a block and clear it.
3.2.2.6 Efficiency Considerations for malloc  Efficiency considerations in use of these functions.
3.2.2.7 Allocating Aligned Memory Blocks  Allocating specially aligned memory.
3.2.2.8 Malloc Tunable Parameters  Use mallopt to adjust allocation parameters.
3.2.2.9 Heap Consistency Checking  Automatic checking for errors.
3.2.2.10 Memory Allocation Hooks  You can use these hooks for debugging programs that use malloc.
3.2.2.11 Statistics for Memory Allocation with malloc  Getting information about how much memory your program is using.
3.2.2.12 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