@lunarised Wanted a chunk of memory anyway? We already had that, it was called static arrays.
Seriously, since a couple years I wonder if one can always replace malloc/free with forks.
I think that it should be possible to prove that you always bind memory to processing, and there is no other reason except programmer lazyness to do such processing in the same process.
Counter-argument: sed hold-space processing.
Counter-counter-argument: you just need more expressive pipes and redirections, and instead of one single hold-space, you'd get multiple spaces each connected to simpler version of sed.
Counter-counter-counter argument: that's cheating, as the pipes would handle memory growth under the hood in kernel space.
But... why not?
Userspace programs would be way simpler (and safer) without malloc/free.
Pixel density and size of a display can be known in advance.
Windows' max size is that of the (virtual) display and actually, if you properly align your memory buffer, when the actual size is smaller then the available memory, several pages are never faulted.
@lanodan @wolf480pl @lunarised
(this is an honest question, I know near to nothing about low level graphics.. but I mean: you know how large is the screen, don't you?)
@Shamar @lanodan @lunarised you'd need to know it at compile time
Well, to be precise, you'd need to know it at loading time. In mainstream os this mean you must know it at compile time to save such info in your ELF binary or something.
But could we imagine something more flexible than that?
- Windows tends to be resizeable
- Displays do not all have the same pixel density
- Displays do not all have the same size
Only case where you could consider using static memory would be for loading slashes and error popups.