2008-12-18 16:42:28 -07:00
|
|
|
// 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.
|
|
|
|
|
|
|
|
// Go declarations for malloc.
|
|
|
|
// The actual functions are written in C
|
|
|
|
// and part of the runtime library.
|
|
|
|
|
|
|
|
package malloc
|
|
|
|
|
2009-01-16 13:47:24 -07:00
|
|
|
export type Stats struct {
|
2009-01-16 17:12:14 -07:00
|
|
|
Alloc uint64;
|
|
|
|
Sys uint64;
|
2008-12-18 16:42:28 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
export func Alloc(uint64) *byte;
|
|
|
|
export func Free(*byte);
|
|
|
|
export func GetStats() *Stats;
|
2009-01-16 16:03:22 -07:00
|
|
|
export func Lookup(*byte) (*byte, uintptr);
|