diff --git a/pod/perlclib.pod b/pod/perlclib.pod index 8259682dd1e8..091be6828ff3 100644 --- a/pod/perlclib.pod +++ b/pod/perlclib.pod @@ -166,7 +166,10 @@ should use C instead: p = realloc(p, n) Renew(p, n, t) It is not portable to try to allocate 0 bytes; allocating 1 or more is -portable. +portable. Never pass pointers between C, C, C and +I equivalents C, C, C. They are not from the +same memory pool or allocator. Either an instant or delayed I will +occur, or subtle memory leaks or subtle heap corruption. memcpy(dst, src, n) Copy(src, dst, n, t) memmove(dst, src, n) Move(src, dst, n, t) diff --git a/pod/perldelta.pod b/pod/perldelta.pod index d53738408312..dd346853520c 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -231,10 +231,22 @@ Additionally, the following selected changes have been made: =head3 L +=head4 F and F + =over 4 -=item * +=item Memory Allocation in C/XS + +Documentation was updated to reflect that mixing C, C, and +C vs C, C, and C are not allowed, and mixing +pointers between the 2 classes of APIs is not allowed. Updates made in +F and F. + +=back + +=over 4 +=item Added the change note for apostrophes in names being reinstated, which was delayed by the review cycle. diff --git a/pod/perlguts.pod b/pod/perlguts.pod index df6404c36874..2dd712e91dca 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -2384,7 +2384,10 @@ marked with correct flags. All memory meant to be used with the Perl API functions should be manipulated using the macros described in this section. The macros provide the necessary transparency between differences in the actual malloc implementation that is -used within perl. +used within perl. Never pass pointers between C, C, C +and I equivalents C, C, C. They are not from the +same memory pool or allocator. Either an instant or delayed I will +occur, or subtle memory leaks or subtle heap corruption. The following three macros are used to initially allocate memory :