compiler – Relationship between standard C libraries and standard Java libraries

The standard library C is a set of functions, macros, and so on. defined in header files to be provided by an implementation of the C language. The types of functions found there are: input-output, math, string processing, memory allocation, and so on. However, this standard library does not necessarily include / expose / not offer implemented in terms of system calls). Examples of these library functions include fread, malloc, which can be considered as using system calls in their implementation (for example, Lily and sbrk), although buffering and implementing what is required by the C language, rather than providing direct or 1: 1 access to the respective system calls.

Most languages ​​have a way to access more or less directly to system calls, depending on the system call mechanism, possibly via a library provided by the operating system. Such a library provided by the operating system will generally be accessible via the C calling conventions, so that any language that can call C can call these system calls.

A Java implementation is free to use standard C library calls or to directly call the operating system, or both, as it sees fit.