121,000 results
Open links in new tab
  1. Dynamic Memory Allocation in C - GeeksforGeeks

    Sep 1, 2026 · Explanation: malloc (5 * sizeof (int)) allocates enough memory to store 5 integers, while ptr stores the address of the …

  2. malloc - cppreference.com

    malloc is thread-safe: it behaves as though only accessing the memory locations visible through its argument, and not any static …

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

    Normally, malloc () allocates memory from the heap, and adjusts the size of the heap as required, using sbrk (2). When allocating …

  4. C dynamic memory allocation - Wikipedia

    C dynamic memory allocation refers to performing manual memory management for dynamic memory allocation in the C …

  5. malloc | Microsoft Learn

    Feb 7, 2023 · malloc returns a void pointer to the allocated space, or NULL if there's insufficient memory available. To return a …

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

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

    Oct 24, 2022 · Size malloc allows you to allocate much larger memory spaces than the one allocated simply using student p; or int x …

  8. C++ malloc() - GeeksforGeeks

    Jun 20, 2026 · The malloc () function dynamically allocates a specified number of bytes at runtime and returns a pointer to the …

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

  10. C 库函数 – malloc () | 菜鸟教程

    C 库函数 - malloc () C 标准库 - <stdlib.h> 描述 C 库函数 void *malloc (size_t size) 分配所需的内存空间,并返回一个指向它的指针。 …