Documentation ¶
Index ¶
- Variables
- func AssertMemoryExpectation(t *testing.T, counter expvar.Int, expected int64)
- func AssertMemoryUsage(t *testing.T)
- func InitMemoryTracker()
- func ResetMemoryStats()
- func TestMemoryTracker(ptr unsafe.Pointer, sz C.size_t, op C.rtloader_mem_ops_t)
- func TrackedCString(str string) unsafe.Pointer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Allocations tracks number of memory allocations Allocations = expvar.Int{} // Frees tracks number of memory frees Frees = expvar.Int{} )
Functions ¶
func AssertMemoryExpectation ¶
AssertMemoryExpectation makes sure the allocations match the provided value
func AssertMemoryUsage ¶
AssertMemoryUsage makes sure the allocations and frees match
func InitMemoryTracker ¶
func InitMemoryTracker()
InitMemoryTracker initializes RTLoader memory tracking
func ResetMemoryStats ¶
func ResetMemoryStats()
ResetMemoryStats resets allocations and frees counters to zero
func TestMemoryTracker ¶
TestMemoryTracker is the method exposed to the RTLoader for memory tracking
func TrackedCString ¶
TrackedCString retruns an allocation-tracked pointer to a string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.