About 50 results
Open links in new tab
  1. Why, or when, do you need to dynamically allocate memory in C?

    8 Dynamic allocation is required when you don't know the worst case requirements for memory. Then, it is impossible to statically allocate the necessary memory, because you don't know how much you will …

  2. I do not understand what exactly is dynamic memory allocation

    Aug 2, 2024 · So apparently dynamic memory allocation allows memory to be allocated during runtime instead of compile time like static memory allocation. I also understand that using these functions in …

  3. What is Dynamic Memory Allocation in C++? - Stack Overflow

    Jan 29, 2013 · I'm learning about Dynamic Memory Allocation in C++ and the keywords new and new[] are mentioned. It is said to enable users to specify the size of the memory allocation at runtime, …

  4. How to dynamically allocate arrays in C++ - Stack Overflow

    Feb 21, 2016 · 2 In C++ we have the methods to allocate and de-allocate dynamic memory.The variables can be allocated dynamically by using new operator as,

  5. What and where are the stack and heap? - Stack Overflow

    Sep 17, 2008 · The heap is the area of memory dynamic memory allocations are made out of (explicit "new" or "allocate" calls). It is a special data structure that can keep track of blocks of memory of …

  6. c - Difference between static memory allocation and dynamic memory ...

    Dec 5, 2011 · I would like to know what is the difference between static memory allocation and dynamic memory allocation? Could you explain this with any example?

  7. Dynamic memory allocation in embedded C - Stack Overflow

    Oct 30, 2015 · The only place where it makes sense to use dynamic memory allocation is large hosted, multi-process systems where multiple processes share the same RAM. If your definition of an …

  8. dynamic memory allocation in C - Stack Overflow

    Apr 3, 2010 · Dynamic Memory allocation is the process of allocating the memory during runtime.

  9. list - Why shouldn't I use dynamic data structures on an embedded ...

    Mar 6, 2020 · Speed. Dynamic memory allocation is either relatively slow (and gets slower as the memory gets fragmented) or is fairly wasteful (e.g. buddy system). If you are going to use the same …

  10. memory - C++ Dynamically allocated std::vector - Stack Overflow

    Jul 26, 2017 · It internally get memory dynamically. Now if you want to create the vector with dynamic allocation you are always free to use vector<item>* myVec = new vector<item>(); Although generally …