Question:
Do you agree that "dynamic memory allocation is more flexible and efficient than static memory allocation but ?
Taqi
2009-01-22 02:21:01 UTC
Do you agree that "dynamic memory allocation is more flexible and efficient than static memory allocation but slower than static memory allocation"? Justify your answer
Three answers:
Teacher Qasim
2009-01-24 00:53:06 UTC
Dynamic allocation is flexible because memory can be reallocated on the fly as load conditions change within the system. Static allocation doesn't change once the allocation has been made, and if system load changes, a static allocation that was originally very efficient can prove to be very inefficient.



Dynamic allocation is slower because it involves continual reallocation of memory, which requires repeated execution of lots of code. Static allocation is fast because once it is done, there is almost no code that needs to be executed to use it.



In most general-purpose systems, the higher overhead of dynamic allocation is justified by the much better utilization of system memory resources that it allows, even in the face of a changing system load and application mix.
Techwing
2009-01-22 02:51:10 UTC
Dynamic allocation is flexible because memory can be reallocated on the fly as load conditions change within the system. Static allocation doesn't change once the allocation has been made, and if system load changes, a static allocation that was originally very efficient can prove to be very inefficient.



Dynamic allocation is slower because it involves continual reallocation of memory, which requires repeated execution of lots of code. Static allocation is fast because once it is done, there is almost no code that needs to be executed to use it.



In most general-purpose systems, the higher overhead of dynamic allocation is justified by the much better utilization of system memory resources that it allows, even in the face of a changing system load and application mix.
mike H
2009-01-22 02:27:05 UTC
dynamic memory normally implies its being used by more than one source such as an operating system and a graphics card - static memory is usually dedicated to a single source making it faster


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...