mirror of
https://github.com/golang/go
synced 2024-11-13 17:50:23 -07:00
61f3302044
the raw fmt routines will be another, smaller but subtler pass. R=rsc DELTA=157 (0 added, 0 deleted, 157 changed) OCL=22851 CL=22851
26 lines
447 B
Go
26 lines
447 B
Go
// $G $D/$F.go && $L $F.$A && ./$A.out
|
|
|
|
// Copyright 2009 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// trivial malloc test
|
|
|
|
package main
|
|
|
|
import (
|
|
"flag";
|
|
"fmt";
|
|
"malloc";
|
|
)
|
|
|
|
var chatty = flag.Bool("v", false, "chatty");
|
|
|
|
func main() {
|
|
malloc.Free(malloc.Alloc(1));
|
|
if *chatty {
|
|
fmt.Printf("%+v %v\n", *malloc.GetStats(), uint64(0));
|
|
}
|
|
}
|
|
|