The Chakra runtime

Each Chakra runtime has its own independent execution engine, JIT compiler, and garbage collected heap. As such, each runtime is completely isolated from other runtimes.

Runtimes can be used on any thread, but only one thread can call into a runtime at any time.

NOTE: A JavaScriptRuntime, unlike other objects in the Chakra hosting API, is not garbage collected since it contains the garbage collected heap itself. A runtime will continue to exist until Dispose is called.

		internal static extern JsErrorCode JsCreateContext(JsRuntime runtime, out JsContext newContext);
		internal static extern JsErrorCode JsGetRuntime(JsContext context, out JsRuntime runtime);
		internal static extern JsErrorCode JsSetRuntimeMemoryAllocationCallback(JsRuntime runtime,
			IntPtr callbackState, JsMemoryAllocationCallback allocationCallback);
		internal static extern JsErrorCode JsSetRuntimeBeforeCollectCallback(JsRuntime runtime, IntPtr callbackState,
			JsBeforeCollectCallback beforeCollectCallback);
		internal static extern JsErrorCode JsEnableRuntimeExecution(JsRuntime runtime);
		internal static extern JsErrorCode JsIsRuntimeExecutionDisabled(JsRuntime runtime, out bool isDisabled);
		internal static extern JsErrorCode JsSetRuntimeMemoryLimit(JsRuntime runtime, UIntPtr memoryLimit);
		internal static extern JsErrorCode JsGetRuntimeMemoryUsage(JsRuntime runtime, out UIntPtr memoryUsage);
		internal static extern JsErrorCode JsDisposeRuntime(JsRuntime handle);
		internal static extern JsErrorCode JsCollectGarbage(JsRuntime handle);
		internal static extern JsErrorCode JsCreateRuntime(JsRuntimeAttributes attributes,
			JsThreadServiceCallback threadService, out JsRuntime runtime);