It depends upon the machine architecture and whether the programis encoded in native machine code or requires further translationto produce the required machine code.With native code, the operating system's program loadertypically decodes the executable, allocating separate memoryregions to cater for the program's text segment (the actual machinecode), the data segment (static memory) and a call-stack for themain thread (additional call-stacks are allocated at runtime as andwhen required by any additional threads). The data segment isdivided into two sections, an initialised section and anuninitialised section. The initialised section is usually stored asa bitmap within the executable file and is simply loaded directlyinto memory as-is. The uninitialised section makes up the remainderof static memory and is typically zero-initialised. The textsegment can refer to any value in the data segment using thevalue's offset memory address which was established at link time.Once the execution environment is fully established, control ispassed to the machine code which typically pushes the global mainfunction onto the call stack and passes control to the firstinstruction. When the global main function ends, the programterminates and all memory allocations are released, including allmemory allocated by the program at runtime.With non-native code, a runtime interpreter is required toperform the translation from the compiled or high-level source codeto native machine code. For instance, Java source code compiles toJava byte code which is suitable for interpretation by the Javavirtual machine (JVM). The JVM is a native machine code programlike any other and the JVM creates and manages the executionenvironment for the Java byte code.