On Tue, 4 Mar 2003 11:51:22 -0000, [EMAIL PROTECTED] (Rob Dixon) wrote: >Luinrandir Hernsen wrote: >> Hallo >> What is the maximum number of charecters in a string? >> $A=123456789>>>>???? > >It's hower big a number a 'size_t' value can hold under the >C compiler that built your Perl. This is usually an 'unsigned int' >which, if it is 32 bits int, has a limit of just over 4 billion. >Whether you have enough RAM for that is another >question :-) >Cheers, >Rob
Just for fun I ran #!/usr/bin/perl $str = A x 500000; while(1){ $str .= $str; } I watched it with top. It grew until it's memory usage was 965 M, and was swapping, then it died with "Out of Memory". I'm guessing as the 965 M tried to concantate the last time, it hit the 2 gig file size limit? Since everything in linux is a file, I'm guessing when your memory usage hits 2 gig, you stop? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]