0% found this document useful (0 votes)
15 views

In A Standard C Program The Compiler Allocates A Memory For All Variables at The Compilation Time This Is Also Known As The Static Memory

Dynamic memory allocation allows memory to be allocated and freed at runtime rather than at compile time, avoiding wasted memory from static allocation. It allocates memory as needed from the free store and returns it when no longer used, ensuring programs have exactly the required memory without failure due to insufficient allocation.

Uploaded by

Mohammed Jeelan
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

In A Standard C Program The Compiler Allocates A Memory For All Variables at The Compilation Time This Is Also Known As The Static Memory

Dynamic memory allocation allows memory to be allocated and freed at runtime rather than at compile time, avoiding wasted memory from static allocation. It allocates memory as needed from the free store and returns it when no longer used, ensuring programs have exactly the required memory without failure due to insufficient allocation.

Uploaded by

Mohammed Jeelan
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Dynamic Memory Allocation

In a standard C program the compiler allocates a


memory for all variables at the compilation
time this is also known as the static memory
allocation.
This memory is fixed and cannot be increased or
decreased after allocation. If more memory is
allocated than requirement, then memory is
wasted.
If less memory is allocated than requirement, then
program will not run successfully.
So exact memory required space must be known in
advance.

You might also like