About 67,300 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. std::malloc - cppreference.com

    Allocates size bytes of uninitialized storage. If allocation succeeds, returns a pointer to the lowest (first) byte in the allocated memory block that is suitably aligned for any scalar type (at least as strictly as …

  6. 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 …

  7. malloc_info (3) - Linux manual page - man7.org

    controls the size of the blocks to be allocated.

  8. 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 …

  9. malloc () vs new - GeeksforGeeks

    Jun 5, 2026 · malloc () (Memory Allocation) is a standard C library function used to allocate a specified amount of memory at runtime. It allocates raw memory and returns a pointer to the allocated block.

  10. 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 …