Copyright © 2024 SingChun Lee Bucknell University. All rights reserved. Sites developed using revealjs.
Where?
How?
What allocations are possible in what languages?
What / Language | Java | C++ | Python |
---|---|---|---|
globals/data/text segment | nope | yup | nope (globals in heap!) |
stack frames | yup | yup | yup |
primitives inside a frame on stack | yup | yup | yup |
constructed/array/object (inside stack frame on stack) | nope | yup | nope |
primitive on heap | nope | yup | nope |
constructed/array/object on heap | yup | yup | yup |
primitives in constructed/array/object (wherever the constructed is located) | yup | yup | yup |
constructed/array/object in constructed/array/object (wherever the constructed is located) | yup | yup | yup |