Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: RE: heap_chunk_in_mb default value (Was Re: perl - segfault on "free unused scalar") Date: Wed, 27 Jul 2005 19:23:44 -0700 Message-ID: <23AA05B1B7171647BC38C5D761900EA40223C84E@DF-SEADOG-MSG.exchange.corp.microsoft.com> From: "Stephan Mueller" To: Cc: "Krzysztof Duleba" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id j6S2Rtut012481 Igor Pechtchanski wrote: " (I wrote:) " > End result is that the perl internal representation in the example above " > probably only needs about 200MB of space, and not double that, as " > suggested. " " Umm, that was unclear from the description on the perlunicode manpage. " That, combined with Perl actually taking up 500M of memory with one string " of 200,000,000 characters, led me to believe that Perl uses UCS-2 " internally. " " Do you have another explanation for the doubled memory consumption? " Igor The admittedly old perl pages (perl 5.6) I have handy right now include the following near the top of the perlunicode page. I strongly doubt this has changed in 5.8. Byte and Character semantics Beginning with version 5.6, Perl uses logically wide characters to represent strings internally. This internal representation of strings uses the UTF-8 encoding. I've also found text suggesting the same in Chapter 15 of the Camel book. Unfortunately, I don't have another explanation for the doubled memory consumption. stephan(); -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/