3 ms·
Why are programs even allocating memory that they don't use?
by frollogaston 4mo ago
Why are programs even allocating memory that they don't use?
- man8alexd 4mo agoBecause no one can predict the future, and they don't know how many resources they will need.
- frollogaston 4mo agoI mean they can just malloc when they need more, what am I missing? Unless this is about JVMs which might preallocate a ton for their heaps and not use it
- swappie 4mo agoApps could, yes. But it’s about 1000x slower to call the OS to allocate a new page, than to just use a pointer to preallocated space.