|
From: | Jörg F . Wittenberger |
Subject: | Re: [Chicken-users] Question again on heap mutation from signal handlers. |
Date: | 02 Oct 2011 19:02:59 +0200 |
On Oct 2 2011, Jörg F. Wittenberger wrote:
Kon (or maybe Felix) On Sep 1 2011, Kon Lovett wrote:Probably of no use to you but … When I added all the extra unix (Chicken v2 I think) signals stuff I figured (ha) that a Scheme signal handler could only perform operations that accessed existing structures, no heap mutation. I used handlers that basically only set flags.Is there a way to verify that signal handlers can not allocate on the heap? As far as I understand runtime.c this should be true. But it's fairly complicated to reason here. It would be very, very helpful to be sure about that one. Since my eat-all-mem issue was gone all too suddenly ... Now I tried to re-enable the old handler invocation to confirm that the old issue would come back. So far it did not - which is confusing.
To summarize: no reason for confusion: "so far" meant: about 20 min. trying to force it. Sometimes it's easier to just wait :-/ At least it reduces confusion. A bit, that is. If I could knew for sure that signal handlers may not touch the heap, I would know that the approach to accept the higher latency in exchange for the more natural coding of signal handlers would be worth the time. Alan: DON'T enable the normal signal handling. It might work some seemingly infinite time. But eventually goes into EAM mode. No theory why; just observation so far. /Jörg PS: If it eventually turns out to be true that the signal handler has been the issue I had. Plus it would turn out to be verifiable that always running with interrupts disabled does not eventually harm normal behaviour. ... THEN I'd call that a productive time! We could leave quite some code with the garbage collector.
[Prev in Thread] | Current Thread | [Next in Thread] |