From 7a1a5df1222c564cb10bb3d1e97684e259b32d99 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 27 Oct 2020 11:29:30 +0100 Subject: [PATCH] Align comments of the new heap functions with docs --- std/assembly/index.d.ts | 4 ++-- std/assembly/memory.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index c7219faabb..1889fcce55 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -1326,9 +1326,9 @@ declare namespace heap { export function alloc(size: usize): usize; /** Reallocates a chunk of memory to have at least the specified size. */ export function realloc(ptr: usize, size: usize): usize; - /** Frees a chunk of memory. */ + /** Frees a chunk of memory. Does hardly anything (most recent block only) with the stub/none runtime. */ export function free(ptr: usize): void; - /** Resets the heap. Stub/none runtime only. */ + /** Dangerously resets the entire heap. Specific to the stub/none runtime. */ export function reset(): void; } diff --git a/std/assembly/memory.ts b/std/assembly/memory.ts index 6798ebf46e..e1b612af21 100644 --- a/std/assembly/memory.ts +++ b/std/assembly/memory.ts @@ -86,13 +86,13 @@ export namespace heap { return __realloc(ptr, size); } - /** Frees a chunk of memory. */ + /** Frees a chunk of memory. Does hardly anything (most recent block only) with the stub/none runtime. */ // @ts-ignore: decorator @unsafe export function free(ptr: usize): void { __free(ptr); } - /** Resets the heap. Stub/none runtime only. */ + /** Dangerously resets the entire heap. Specific to the stub/none runtime. */ // @ts-ignore: decorator @unsafe export function reset(): void { __reset();