github.com/moontrade/unsafe@v0.9.1/memory/tlsf/arena_sys_test.go (about)

     1  package tlsf
     2  
     3  import (
     4  	"fmt"
     5  	"testing"
     6  	"unsafe"
     7  )
     8  
     9  func TestSysAlloc(t *testing.T) {
    10  	var stat sysMemStat
    11  	fmt.Println(unsafe.Sizeof(sysMemStat(0)))
    12  	//ptr := persistentalloc(65536, unsafe.Sizeof(uintptr(0)), &stat)
    13  	//ptr2 := persistentalloc(65536, unsafe.Sizeof(uintptr(0)), &stat)
    14  	ptr3 := sysAlloc(65536, &stat)
    15  	_ = ptr3
    16  	//fmt.Println("ptr", ptr, "ptr2", ptr2, "ptr3", ptr3)
    17  }