This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Document in one place the memory abstractions used in Perl core.
authorSimon Cozens <simon@netthink.co.uk>
Wed, 2 Aug 2000 02:20:23 +0000 (02:20 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 2 Aug 2000 02:44:51 +0000 (02:44 +0000)
Subject: Re: Memory abstraction
Organization: Earth.li Origins

p4raw-id: //depot/perl@6487

pod/perlguts.pod

index 1738742..8f4839a 100644 (file)
@@ -1317,6 +1317,20 @@ destination starting points.  Perl will move, copy, or zero out C<number>
 instances of the size of the C<type> data structure (using the C<sizeof>
 function).
 
+Here is a handy table of equivalents between ordinary C and Perl's
+memory abstraction layer:
+
+ Instead Of:                Use:
+ malloc                     New
+ calloc                     Newz
+ realloc                    Renew
+ memcopy                    Copy
+ memmove                    Move
+ free                       Safefree
+ strdup                     savepv
+ strndup                    savepvn (Hey, strndup doesn't exist!)
+ memcopy/*(struct foo *)    StructCopy
+
 =head2 PerlIO
 
 The most recent development releases of Perl has been experimenting with