Skip to content
Discussion options

You must be logged in to vote

Dynamic memory allocation means that one can start with low memory and the payload data segments are dynamically increased, depending on the required memory size. The payloads data segment does not shrink though. So, once the first example has reached the memory size of the second, there is no difference. While allocating more memory, there will be latency spike in the first example. In general, the first example is ideal when you do not know your final memory size, e.g. during development and the second example is ideal for production.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ElliotHYLee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants