aboutsummaryrefslogtreecommitdiff
path: root/doc/language/function/cpsc-function-realloc.7.md
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-20 01:31:47 +0000
committer_ov4 <ov4@ov4.org>2026-10-20 01:31:47 +0000
commit1ed0e276a37d39386b22b08c1f9e575a8f8f8725 (patch)
tree4662810e9a9c23e3af81ad3aea80594ab91cf1df /doc/language/function/cpsc-function-realloc.7.md
parent81e18a089ccc5ef4869d6b5a53f49e4696d33dd7 (diff)
docs(man): correct class lifetime and allocation support
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'doc/language/function/cpsc-function-realloc.7.md')
-rw-r--r--doc/language/function/cpsc-function-realloc.7.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/language/function/cpsc-function-realloc.7.md b/doc/language/function/cpsc-function-realloc.7.md
index dc2d61f..7b29c45 100644
--- a/doc/language/function/cpsc-function-realloc.7.md
+++ b/doc/language/function/cpsc-function-realloc.7.md
@@ -14,7 +14,7 @@ REALLOC(pointer, bytes)
REALLOC is a compiler extension returning C `void*`. The pointer argument must also be C `void*`; explicitly cast other pointer types. The size accepts INTEGER or a C integer and converts to host size_t, just as MALLOC does.
-A null pointer behaves as MALLOC(bytes). A non-null pointer must start an active explicit MALLOC or REALLOC allocation, even when bytes is zero. Invalid addresses print the source line and reason to stderr and throw an anonymous exception before touching the memory or allocation record.
+A null pointer behaves as MALLOC(bytes). A non-null pointer must start an active tracked MALLOC, REALLOC or keyword NEW allocation, even when bytes is zero. Invalid addresses print the source line and reason to stderr and throw an anonymous exception before touching the memory or allocation record. Resizing or releasing memory with REALLOC does not invoke constructors or destructors.
For a valid pointer and zero bytes, REALLOC releases the block and returns null. This rule is independent of libc's zero-size behavior. For a nonzero size, successful resizing preserves the smaller of the old and new sizes; added bytes are uninitialized. The returned address may differ from the input. Use the returned pointer afterward; previous aliases must not be used.