Thursday, July 4, 2013

Difference Between Static Memory and Dynamic

STATIC MEMORY ALLOCATION

DYNAMIC MEMORY ALLOCATION


Memory is allocated before the execution of the program begins.

Memory is allocated during the execution of the program.

Implemented using stacks and heaps.

Implemented using data segments.

Pointer is needed to accessing variables.

No need of Dynamically allocated pointers.

Faster execution than Dynamic.

Slower execution than static.

More memory Space required.

Less Memory space required.

18 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
    Replies
    1. plz tell me the right one

      Delete
    2. what? this is right. Why did you say its wrong?

      Delete
    3. No memory allocated at the compile time. But the memory is know n at the compile time in static memory allocation

      Delete
  2. wrong hai sab...

    ReplyDelete
  3. in static implementation is done by data segment
    in dynamic implementation is done by stack and heap

    ReplyDelete
  4. abe jab nahi aata to wrong kyu post karte ho

    ReplyDelete
  5. wrong point 2-3
    plz make correct 1.

    ReplyDelete
  6. wrong point 2-3
    plz make correct 1.

    ReplyDelete
  7. Shyam prakash chutiya hai

    ReplyDelete
  8. nice article thanks to sharing with us. it is useful.
    http://weballigator.ga/basic-c-language/

    ReplyDelete