mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 07:33:01 +00:00 
			
		
		
		
	Add janet_vm_save and janet_vm_load.
This lets a user multiplex multiple Janet VMs on a single thread or process if they are willing to implement context switching themselves.
This commit is contained in:
		| @@ -163,7 +163,7 @@ Janet(janet_wrap_number)(double x) { | ||||
| void *janet_memalloc_empty(int32_t count) { | ||||
|     int32_t i; | ||||
|     void *mem = janet_malloc((size_t) count * sizeof(JanetKV)); | ||||
|     janet_vm_next_collection += (size_t) count * sizeof(JanetKV); | ||||
|     janet_vm.next_collection += (size_t) count * sizeof(JanetKV); | ||||
|     if (NULL == mem) { | ||||
|         JANET_OUT_OF_MEMORY; | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose