Описание тега malloc
The malloc function performs dynamic memory allocation in C and is part of the standard library. Use this tag for questions about usage, behavior and implementations of malloc.
The malloc tag is used for questions related to the use of the malloc()
function, part of the C standard library.
malloc()
, along with free()
, calloc()
, and realloc()
, is used to explicitly manage memory in C.
malloc()
returns the address of a newly allocated block of memory, or NULL
if memory allocation fails. The memory returned by malloc
is uninitialized, and should be assumed to be filled with random data.
Wikipedia
References
- malloc - cppreference.com
- malloc - The Open Group Base Specifications Issue 7
- Ubuntu Manpage: malloc, free, calloc, realloc - Allocate and free dynamic memory
- Memory Allocation Routines - C Run-Time Library Reference (Visual Studio 2012)
- malloc - C Run-Time Library Reference (Visual Studio 2012)
- How is malloc() implemented internally?