Browse Source

Correct wasm page_allocator switch cases

Damian Tarnawski 1 year ago
parent
commit
b0aa08f85b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      vendor/wasm/js/memory_js.odin

+ 2 - 2
vendor/wasm/js/memory_js.odin

@@ -21,10 +21,10 @@ page_allocator :: proc() -> mem.Allocator {
 	                  old_memory: rawptr, old_size: int,
 	                  old_memory: rawptr, old_size: int,
 	                  location := #caller_location) -> ([]byte, mem.Allocator_Error) {
 	                  location := #caller_location) -> ([]byte, mem.Allocator_Error) {
 		switch mode {
 		switch mode {
-		case .Alloc, .Alloc_Non_Zeroed, .Resize_Non_Zeroed:
+		case .Alloc, .Alloc_Non_Zeroed:
 			assert(size % PAGE_SIZE == 0)
 			assert(size % PAGE_SIZE == 0)
 			return page_alloc(size/PAGE_SIZE)
 			return page_alloc(size/PAGE_SIZE)
-		case .Resize, .Free, .Free_All, .Query_Info:
+		case .Resize, .Free, .Free_All, .Query_Info, .Resize_Non_Zeroed:
 			return nil, .Mode_Not_Implemented
 			return nil, .Mode_Not_Implemented
 		case .Query_Features:
 		case .Query_Features:
 			set := (^mem.Allocator_Mode_Set)(old_memory)
 			set := (^mem.Allocator_Mode_Set)(old_memory)