Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestUserArenaClonePointer (1.06 sec)

  1. src/runtime/arena_test.go

    	sCopy := UserArenaClone(s)
    	if unsafe.StringData(s) != unsafe.StringData(sCopy) {
    		t.Error("Clone should not have made a copy")
    	}
    
    	a.Free()
    }
    
    func TestUserArenaClonePointer(t *testing.T) {
    	a := NewUserArena()
    
    	// Clone should not make a copy of a heap-allocated smallScalar.
    	x := Escape(new(smallScalar))
    	xCopy := UserArenaClone(x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 13.4K bytes
    - Viewed (0)
Back to top