@@ -24,7 +24,7 @@ export declare interface RtraceOptions {
24
24
/** Function being called with information messages. */
25
25
oninfo ?: ( msg : string ) => void ,
26
26
/** Obtains the module's memory instance. */
27
- getMemory ( )
27
+ getMemory ( ) : WebAssembly . Memory ;
28
28
}
29
29
30
30
export declare class Rtrace {
@@ -38,4 +38,25 @@ export declare class Rtrace {
38
38
39
39
/** Checks if there are any leaks and emits them via `oninfo`. Returns the number of live blocks. */
40
40
check ( ) : number ;
41
+
42
+ /** A function that is called when an allocation occurs. */
43
+ onalloc ( ptr : number ) : void ;
44
+
45
+ /** A function that is called when a heap allocation resize occurs. */
46
+ onresize ( ptr : number , oldSize : number ) : void ;
47
+
48
+ /** A function that is called when an object is moved on the heap. */
49
+ onmove ( oldPtr : number , newPtr : number ) : void ;
50
+
51
+ /** A function that is called when a heap allocation is freed. */
52
+ onfree ( ptr : number ) : void ;
53
+
54
+ /** A function that is called when a reference counting increment occurs. */
55
+ onincrement ( ptr : number ) : void ;
56
+
57
+ /** A function that is called when a reference counting decrement occurs. */
58
+ ondecrement ( ptr : number ) : void ;
59
+
60
+ /** Obtains information about a block. */
61
+ getBlockInfo ( ptr : number ) : BlockInfo ;
41
62
}
0 commit comments