aboutsummaryrefslogtreecommitdiff
path: root/doc/language/function/cpsc-function-free.7.md
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-17 05:33:33 +0000
committer_ov4 <ov4@ov4.org>2026-10-17 05:33:33 +0000
commit4e22f464387725a5a282f3d72e11cfb694a31a5a (patch)
tree17fed09b30633e6aae583f490a0ad9c0c95fb045 /doc/language/function/cpsc-function-free.7.md
parent4dd85fd6ecd9a67e5c2b68380873e6e114714355 (diff)
feat(memory): add checked REALLOC with failure preservation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'doc/language/function/cpsc-function-free.7.md')
-rw-r--r--doc/language/function/cpsc-function-free.7.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/language/function/cpsc-function-free.7.md b/doc/language/function/cpsc-function-free.7.md
index 298199d..e2c8f12 100644
--- a/doc/language/function/cpsc-function-free.7.md
+++ b/doc/language/function/cpsc-function-free.7.md
@@ -12,7 +12,7 @@ FREE(pointer)
# DESCRIPTION
-FREE is a compiler extension. Its argument and return type are C void*. Explicitly cast other pointer types to a void* alias before passing them. A null pointer is accepted and returned. A non-null pointer must be the start of an active explicit MALLOC allocation; internal STRING/ARRAY storage, stack addresses, interior addresses and already released allocations are rejected with a source-line diagnostic on stdout and an anonymous exception.
+FREE is a compiler extension. Its argument and return type are C `void*`. Explicitly cast other pointer types to a `void*` alias before passing them. A null pointer is accepted and returned. A non-null pointer must be the start of an active explicit MALLOC or REALLOC allocation; internal STRING/ARRAY storage, stack addresses, interior addresses and already released allocations are rejected with a source-line diagnostic on stdout and an anonymous exception.
FREE returns its input address after releasing the allocation. It does not clear the caller's variable. The returned address and all aliases are invalid for memory access. Calling FREE again on that address throws unless a subsequent allocation has reused the address. Tracking cannot distinguish stale aliases once an address is reused.
@@ -29,4 +29,4 @@ FREE(Memory)
# SEE ALSO
-[cpsc-function-malloc(7)](cpsc-function-malloc.7.md), [cpsc-keyword-function(7)](../keyword/cpsc-keyword-function.7.md), [cpsc-keyword-try(7)](../keyword/cpsc-keyword-try.7.md).
+[cpsc-function-malloc(7)](cpsc-function-malloc.7.md), [cpsc-function-realloc(7)](cpsc-function-realloc.7.md), [cpsc-keyword-function(7)](../keyword/cpsc-keyword-function.7.md), [cpsc-keyword-try(7)](../keyword/cpsc-keyword-try.7.md).