From 1ed0e276a37d39386b22b08c1f9e575a8f8f8725 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Tue, 20 Oct 2026 01:31:47 +0000 Subject: docs(man): correct class lifetime and allocation support Co-Authored-By: Claude Opus 5.5 --- doc/language/function/cpsc-function-realloc.7.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/language/function/cpsc-function-realloc.7.md') 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. -- cgit v1.3.1-4-g156e