Submit Q&A | Tell a friend
Search site for 

Top 100 Interview Questions & Answers in a convenient and easy to read book!

“I bought this guide a few days ago to prepare for my interview with Oracle. Many of the questions they asked me were from this guide. I found this book absolutely great!”

– Ravi, California

Read more comments...

Interview Questions And Answers RSS Feed

Answers »

  1. Submitted By: raja — October 6, 2006
    +5 votes
      + -

    using malloc, calloc and realloc.

    disadvantage is run-time overhead and complexity in implementing it…

  2. Submitted By: johny1 — October 6, 2006
    +6 votes
      + -

    Dynanic memory needs to be carefully deleted after use.

    They are created in distributed area of memory segment.

  3. Submitted By: iamsuechoi — October 6, 2006
    +8 votes
      + -

    1. Dynamic memory allocation is slower than static memory allocation, because dynamic memory allocation happens in heap area.

    2. Dynamic memory allocation causes contention between threads, so it degrades performance when it happens in a thread.

  4. Submitted By: Veerbhan — November 10, 2006
    +9 votes
      + -

    Static memory allocation provides speed at the cost of flexibility compared to dynamic memory allocation.

  5. Submitted By: sandhyasidharth — September 4, 2007
    +0 votes
      + -

    In static memory allocation memory is assigned during compilation time.
    In dynamic memory allocation memory is assigned during run time.

  6. Submitted By: abhishek srivastava — April 24, 2008
    -1 votes
      + -

    static memory allocation use less memory incontrast to DMA
    DMA used for best utilization of memory

  7. Submitted By: abhishek srivastava — April 24, 2008
    -6 votes
      + -

    both have their own ad & disad

  8. Submitted By: svinto — October 21, 2008
    +4 votes
      + -

    Static Disadvantages:

    - Static memory allocation utilizes stack which is a limited resource, especially in such environments as kernel mode.
    - In the most cases it’s quicker but it also depends in the environment (is stack growth is involved).
    - You can’t share the resource allocated on stack in multi-threaded environment.

    Static Advantages:

    - The advantage is that you don’t need to take care about deallocation.

    Dynamic Disadvantages:

    - Allocation is slower than static.
    - You need to take care about deallocation.

    Dynamic Advantages:

    - You can share dynamically allocated memory between threads, does not consume stack space.
    - You can allocate different types of memory (usualy).

  9. Leave an Answer/Comment

    To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
    Click to hear an audio file of the anti-spam word

Our Sponsors
Our Sponsors
Contact Us | FAQ | Sitemap | Terms of Use | Privacy Policy | Tell a Friend

Copyright © 1999-2006 Jeeve Technologies LLC. All rights reserved.