What is static memory allocation and dynamic memory allocation?
Static memory allocation: The compiler allocates the required memory space for a declared variable.By using the address of operator,the reserved address is obtained and this address may be assigned to a pointer variable.Since most of the declared variable have static memory,this way of assigning pointer value to a pointer variable is known as static memory allocation. memory is assigned during compilation time.Dynamic memory allocation: It uses functions such as malloc( ) or calloc( ) to get memory dynamically.If these functions are used to get memory dynamically and the values returned by these functions are assingned to pointer variables, such assignments are known as dynamic memory allocation.memory is assined during run time.
Showing Answers 1 - 6 of 6 Answers
- How do http server knows if it is static request or dynamic request.?
- Why static keyword is introduced in Java ?
- Static synchronization
- Design a dwh table based on the given source
- Advantages of static class over class ?
- How can I make my hard disk dynamic ?
- How to detect bottleneck
- Guess the output of the following program
- How to format memory card
- Explanation of static in c,c++,c#and core Java.
- What is the difference between loop and function recursion?
- What is memory in server and types of it(paged/non paged)
- What are static and dynamic reports?
- Memory addressing
- What are the types of ups ?
- For a scenario I need load runner to give me a report in a specific format.
- What is meant by class space and object space (with regards to memory) in c++?
- Replicating the record in target in Informatica.
- What are the best suitable automation tools available for applications developed on ibm websphere portal