Skip to content

Undifferentiated Memory

Narendra M

Asked Jun 24, 2008, 8:23 PM EDT1 answer
Share
LinkedInX
What is Undifferentiated Memory?. Please anyone tell me about this. What is the relation between heap,stack and Undifferentiated Memory.

Thanks

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    The heap is memory that is dynamically allocated during runtime. Reference types like classes use the heap to store information that is fast to change. The stack is memory that is allocated to be accessed quickly but is less dynamic to use than memory on the heap. Value types like structs use this memory. Undifferentiated memory (going from a few years ago in one of my CS classes) is memory that has not been allocated for either purpose, and is basically a fancy term for "unallocated memory".

    int myInt = 25;                 // Allocate on the stack
    string myString = "Hello";      // Allocate on the heap

    Nullable<int> myNullInt = null; // Creates a null integer on the stack
    int? myNullInt = null;          // Shorthand to create a null integer on the stack
    string myNullString = null;     // Creates a null string on the heap
    0