Any paradigm for memory usage besides Stack and Heap?

As I learned the data structure, I know that in addition to Stack and Heap, there are many other data structures, why processes currently only contain these 2 paradigms as โ€œstandard equipmentโ€ in their address space? Could there be some new paradigm for using memory?

Thank you for your responses. Yes, I realized that something is wrong with my expression. The heap data structure does not match the heap in the process address space. But I wonder, besides the stack area and the heap area in the proecss address space, is there a new paradigm for memory usage? Other ways to use memory seem to be based on these two main paradigms. And are these 2 paradigms a kind of meta paradigm?

+5
source share
8 answers

Think for a moment. We have two fundamental disciplines of storage. Adjacent and fragmented.

adjoining.

  • The stack is limited in order. Last in First Out. Nested function call contexts require this.

  • We can easily invert this pattern to define a Queue . First arrived, first served.

  • We can add queue binding to make Circular Queue . I / O processing requires this.

  • We can combine both restrictions in Dequeue .

  • . .

    . , . .

  • : . "", - .

:

  • "" - . .

  • , . Mac OS.

- ..

  • . - .

  • 0, 1 2 .

  • . ..

? ?

"", . (heapish array-ish)

: . , : LinkedBag, TreeBag, ArrayBag, HashBag. , .

: . . : LinkedSet, TreeSet, ArraySet, HashSet.

: . . : LinkedList, TreeList, ArrayList, HashList.

: . . LinkedMap, TreeMap, ArrayMap, HashMap.

+4

, "" ( , ) , "" ( ).

, , , Stack and Heap: static storage; -)

+3

FIFO . . ?

+2

Javolution (http://javolution.org/) , , "" . , .. Java, ++, .

+2

?

+1

"" , , : , , . ( "" OS/Kernel).

, ; / .

+1
source

I think this is due to the physical nature of memory. Heaps and stacks are just intuitive ways to represent them.

For example, a queue or list does not provide conceptually random access. The tree does not represent the physical nature of memory (one cell after another, like an array). Any type of tuple with address x, y is unnecessarily complex compared to a simple integer address.

+1
source

All Articles