About 72,600 results
Open links in new tab
  1. Dynamic Memory Allocation in C - GeeksforGeeks

    Apr 9, 2026 · The malloc () (stands for memory allocation) function is used to allocate a single block of contiguous memory on the heap at runtime. The memory allocated by malloc () is uninitialized, …

  2. malloc - cppreference.com

    Allocates size bytes of uninitialized storage. If allocation succeeds, returns a pointer that is suitably aligned for any object type with fundamental alignment. If size is zero, the behavior of malloc is …

  3. malloc | Microsoft Learn

    Feb 7, 2023 · The malloc function allocates a memory block of at least size bytes. The block may be larger than size bytes because of the space that's required for alignment and maintenance information.

  4. malloc (3) - Linux manual page - man7.org

    malloc () The malloc () function allocates size bytes and returns a pointer to the allocated memory. The memory is not initialized. If size is 0, then malloc () returns a unique pointer value that can later be …

  5. C dynamic memory allocation - Wikipedia

    In C, the library function malloc is used to allocate a block of memory on the heap. The program accesses this block of memory via a pointer that malloc returns. When the memory is no longer …

  6. malloc - C++ Users

    Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. The content of the newly allocated block of memory is not initialized, remaining with indeterminate values.

  7. C stdlib malloc () Function - W3Schools

    Definition and Usage The malloc() function allocates memory and returns a pointer to it. Unlike calloc() the memory is not initialized, so the values are unpredictable. The malloc() function is defined in the …

  8. malloc () function - C library

    The C stdlib library malloc () function is used for dynamic memory allocation. It allocates or reserves a block of memory of specified number of bytes and returns a pointer to the first byte of the allocated …

  9. c - When and why to use malloc - Stack Overflow

    You use malloc when you need to allocate objects that must exist beyond the lifetime of execution of the current block (where a copy-on-return would be expensive as well), or if you need to allocate …

  10. C Dynamic Memory Allocation Using malloc (), calloc (), free ...

    To allocate memory dynamically, library functions are malloc(), calloc(), realloc() and free() are used. These functions are defined in the <stdlib.h> header file. The name "malloc" stands for memory …