Making alloca more safe

Walter Bright newshound1 at digitalmars.com
Sun Nov 22 02:55:04 PST 2009


BCS wrote:
> your driving down the road talking about programing language design and 
> suddenly an 18 wheeler starts tail gateing and another pulls out to 
> pass. In the middle of that, your engine starts to splutter, something 
> it has never done before. What is your reaction? I'll give 10:1 that it 
> takes you a few seconds to recognize that the fuel has been cut, 
> remember that there is a switch to override it, find said switch and 
> push it. Now add in that you didn't install the switch (it comes 
> standard) and you have never taking the manual out of shrink wrap. You 
> starting to see why it will never come standard.

There's also a large red light that comes on when oil pressure drops, 
and a large green light that goes out when the fuel pump is not getting 
power. Me, I like the interface style where a row of green lights says 
everything is good, and red lights say things are bad.

As for anyone else, I designed this system for my own use. It's typical 
for performance cars, you can get the switch at any good speed shop, and 
is in fact required if you're on the track. Watch drag racing on TV. 
Sooner or later, probably sooner, you'll see an engine blow up. Turning 
off the fuel pump automatically only makes sense. Nobody wants to blow 
fuel at 60 psi onto an engine fire.


>>> So tie it into the inition system or a tilt switch (some 4x4 do that
>>> one).
>>>
>> It is tied to the ignition system already. The problem is, the
>> ignition doesn't automatically turn off when you crash your car.
>>
> 
> Yes the ignition (as the the key) doesn't turn off but when the engine 
> quits running the ignition system (as in the magneto or that block of 
> epoxy and silicon under the hood) quits triggering the spark. Tie into 
> that.

Trying to determine if the distributor is no longer turning is a 
non-trivial circuit. Best to stick with simple things when dealing with 
safety issues. The inertial switch is pretty darned simple, it's just a 
ball stuck on the end of a magnet. Knock it hard, it falls off the 
magnet, opening the circuit.



More information about the Digitalmars-d mailing list