Making alloca more safe

BCS none at anon.com
Fri Nov 20 13:47:39 PST 2009


Hello Walter,

> BCS wrote:
> 
>>> (On my car, I installed an oil pressure switch that shuts off the
>>> electric fuel pump if the pressure drops.
>>> 
>> It might not translate to CS but there are good reasons that such a
>> device doesn't come standard on cars; the first time one killed a car
>> in rush hour traffic and set off a 50 car pile-up the someone (GM?)
>> goes bankrupt.
>> 
> With the pump shut off, you have a few seconds of fuel left in the
> carb. With no oil pressure, your engine is going to seize anyway.

In a few minutes yes (and it will still run for some time after it's damaged 
beyond repair), more than long enough off get off the road. I'd put a big 
buzzer in and let the driver decide when it is safe to shut down the engine. 
In some situations, I'd gladly cook the engine to get to safety.

> 
>>> I also pried a switch off of
>>> a junkyard Mustang that shuts off if it gets hit hard, I also plan
>>> on
>>> installing that to shut off the fuel pump. Think of those like a
>>> "seg
>>> fault" <g>)
>> That one might even be worse because it only comes into play when you
>> know things are going wrong; "as soon as things go wrong, my car
>> quits working".
>> 
> You *really* don't want your fuel pump to keep on pumping if you're in
> an accident. That's the purpose of the inertial switch. With older
> mechanical pumps, the pump would stop whenever the engine did. The
> gasoline is safer remaining in the tank than being pumped all over the
> road, the hot engine, and your trapped body.

So tie it into the inition system or a tilt switch (some 4x4 do that one).

>>>> so why not try to make things better by saving what you can?
>>>> 
>>> Sure, you can try saving things, but you'd better hope that there
>>> was already a reasonably recent clean copy of your data.
>>> 
>> that or make a very robust dump system (core dump?)
>> 
> A core dump, no matter how robust, will not fix your data if it is
> randomized by an errant program before it seg faulted.
> 

Who said anything about fixing stuff? I've been thinking only of logging 
and a recover-your-work,-maybe file kinds of things.

I agree, any more than that won't work.





More information about the Digitalmars-d mailing list