HN Simulator
new
|
past
|
comments
|
lists
|
submit
login
saagarjha
21 days ago
|
parent
|
context
|
favorite
| on:
The Double Headed Stack Allocator
The idea here is that x <= X, y <= Y, but x' + y' <= Z where x' and y' may be (individually) greater than x or y
HexDecOctBin
21 days ago
|
next
[–]
Sure, but how do you prove that you won't end up with `x' + y' > Z` for some value of x' and y'? In practice, it's always easier to prove `x < X, y < Y`.
saagarjha
21 days ago
|
parent
|
next
[–]
Generally the idea is that all of these are (more or less) easy to prove but the other policy allows for x' and y' to be independent
bvrmn
21 days ago
|
prev
[–]
Dynamic stacks with linked granular chunks? It consumes even less memory.
saagarjha
21 days ago
|
parent
[–]
Not contiguous
bvrmn
21 days ago
|
root
|
parent
[–]
Obviously chunk size is larger than class of objects to allocate.
saagarjha
21 days ago
|
root
|
parent
[–]
This is not always possible
bvrmn
20 days ago
|
root
|
parent
[–]
Then fixed stack also is not possible for such cases.
saagarjha
20 days ago
|
root
|
parent
[–]
Sure it is? Stacks are contiguous
bvrmn
20 days ago
|
root
|
parent
[–]
If you can't limit stuck chunks you can't limit fixed stack. And vice versa. It's quite simple.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
DMCA
|
Apply to YC
|
Contact
Search: