diff --git a/go.mod b/go.mod
index d160a81..e80caec 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
 module github.com/joetifa2003/mm-go
 
-go 1.19
+go 1.20
 
 require (
 	github.com/ebitengine/purego v0.4.0-alpha.4
diff --git a/malloc/malloc.go b/malloc/malloc.go
index 44c1543..1bef16b 100644
--- a/malloc/malloc.go
+++ b/malloc/malloc.go
@@ -26,7 +26,7 @@ func getSystemLibrary() string {
 }
 
 func init() {
-	libc, err := purego.Dlopen(getSystemLibrary(), purego.RTLD_NOW|purego.RTLD_GLOBAL)
+	libc, err := openLibrary(getSystemLibrary())
 	if err != nil {
 		panic(err)
 	}
diff --git a/malloc/malloc_unix.go b/malloc/malloc_unix.go
new file mode 100644
index 0000000..b4e3b63
--- /dev/null
+++ b/malloc/malloc_unix.go
@@ -0,0 +1,9 @@
+//go:build darwin || linux
+
+package malloc
+
+import "github.com/ebitengine/purego"
+
+func openLibrary(name string) (uintptr, error) {
+	return purego.Dlopen(name, purego.RTLD_NOW|purego.RTLD_GLOBAL)
+}
diff --git a/malloc/malloc_windows.go b/malloc/malloc_windows.go
new file mode 100644
index 0000000..62bfb23
--- /dev/null
+++ b/malloc/malloc_windows.go
@@ -0,0 +1,10 @@
+//go:build windows
+
+package malloc
+
+import "golang.org/x/sys/windows"
+
+func openLibrary(name string) (uintptr, error) {
+	handle, err := windows.LoadLibrary(name)
+	return uintptr(handle), err
+}