chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Memory allocation and limits in chicken scheme progr


From: Peter Bex
Subject: Re: [Chicken-users] Memory allocation and limits in chicken scheme programs
Date: Wed, 13 Dec 2017 20:41:04 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, Dec 13, 2017 at 11:13:54AM -0700, Matt Welland wrote:
> I'm using Chicken 4.10.0 and with the below script chicken rapidly
> allocates memory then seems to get stuck:

Hi Matt,

Try to update to CHICKEN 4.13.0 first (standard advice, we usually
fix lots of issues in new versions).  I simply get this after a few
seconds:

[panic] out of memory - heap has reached its maximum size - execution terminated

The fix is to increase the maximum allowed heap size using -:hm:
csi -:hm4G ./test.scm cleanly exits after a few seconds here with either
version of CHICKEN.

> The program chokes after 133 rounds through the loop. No "out of memory'
> message.

I suppose that's a bug we fixed in 4.13.0; I seem to recall an issue like
that where allocating near the maximum heap size would result in it
triggering a GC, then filling up the heap immediately again etc, resulting
in a GC loop, but I can't find it in NEWS right now.

> The process memory usage doesn't seem to grow and the program just
> hangs. I added -B: but didn't get any output.

Try the -:g option (debugging output for the GC); you'll quickly see that
it's resizing the heap all the time to the same limit.

Cheers,
Peter

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]