Skip to content

Commit 3564303

Browse files
authored
Align comments of the new heap functions with docs (#1524)
1 parent 0fa51ab commit 3564303

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

std/assembly/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1326,9 +1326,9 @@ declare namespace heap {
13261326
export function alloc(size: usize): usize;
13271327
/** Reallocates a chunk of memory to have at least the specified size. */
13281328
export function realloc(ptr: usize, size: usize): usize;
1329-
/** Frees a chunk of memory. */
1329+
/** Frees a chunk of memory. Does hardly anything (most recent block only) with the stub/none runtime. */
13301330
export function free(ptr: usize): void;
1331-
/** Resets the heap. Stub/none runtime only. */
1331+
/** Dangerously resets the entire heap. Specific to the stub/none runtime. */
13321332
export function reset(): void;
13331333
}
13341334

std/assembly/memory.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ export namespace heap {
8686
return __realloc(ptr, size);
8787
}
8888

89-
/** Frees a chunk of memory. */
89+
/** Frees a chunk of memory. Does hardly anything (most recent block only) with the stub/none runtime. */
9090
// @ts-ignore: decorator
9191
@unsafe export function free(ptr: usize): void {
9292
__free(ptr);
9393
}
9494

95-
/** Resets the heap. Stub/none runtime only. */
95+
/** Dangerously resets the entire heap. Specific to the stub/none runtime. */
9696
// @ts-ignore: decorator
9797
@unsafe export function reset(): void {
9898
__reset();

0 commit comments

Comments
 (0)