Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions std/assembly/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions std/assembly/memory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down