6 ms·
Good operating systems also provide `reallocarray()`.
by jedisct1 10y ago
Good operating systems also provide `reallocarray()`.
- deleted 10y ago[deleted]
- astrobe_ 10y agoIt's in the standard library, not in the operating system.
- binarycrusader 10y agoThe standard library is usually delivered as part of the operating system on *nix-like platforms.
- masklinn 10y agoIn fact the standard library is usually part of the operating system in the sense that it's the interface to the OS, on both nix-line and non-nix like systems. Linux is the exception (in that raw syscalls are officially supported) not the rule.
- binarycrusader 10y agoYes, exactly. This is especially true on Darwin and Solaris.
- deleted 10y ago[deleted]
- astrobe_ 10y agoMaking statements as inaccurate as possible without being wrong is a fun game, I guess. My turn: A file explorer is part of the OS because it is installed by default on Windows. A good OS provides a graphical file browser.
- binarycrusader 10y agoAs the other respondent posted, the standard library is the only interface to the operating system on some platforms. For example, on Solaris and various *BSDs, the syscall interface is private or unstable and is explicitly NOT an interface. So without the standard library, none of the applications could run. That sure sounds like part of the operating system to me, and fits various accepted definitions such as the one Wikipedia provides. And yes, I would consider the file explorer included with Windows part of the operating system, as most people I think would also. The confusion here seems to come from the Linux world, where components are mix and match; where you can pair the kernel with an entirely different base. That isn't true of many other operating systems; the base distributed set is designed to work together and provide the environment and platform for applications.
- astrobe_ 10y agoThere's no confusion at all on my part. The operating system isn't even aware that your application has a heap to begin with. All it knows, is that your program may ask for more memory. But if you consider a file browser as being part of the OS, I can't help you. You want to adopt a view that profanes have in a technical discussion. That's worse than ignorance.
- binarycrusader 10y agoYou are very confused and quite frankly very wrong. The original claim was the standard library is not part of the OS. However, the standard library is objectively part of the OS on many platforms and so the original claim is factually incorrect. My so-called "view" reflects the industry accepted definition of an OS, so perhaps you should review your suppositions.
- astrobe_ 10y agoOk so name a few of the "OS on many platforms" in which one absolutely can't replace the standard library.