:: Re: [DNG] "Common knowledge?"-quest…
Página Principal
Delete this message
Reply to this message
Autor: karl
Data:  
Para: dng
Assunto: Re: [DNG] "Common knowledge?"-question
Reiner Weikusat:
> Peter Olson <peabo@???> writes:
>
> >> On January 23, 2016 at 1:36 PM Rainer Weikusat
> >> <rainerweikusat@???> wrote:
> >>
> >> Peter Olson <peabo@???> writes:
> >> 5>> On January 22, 2016 at 4:34 PM Rainer Weikusat
> >> <rainerweikusat@???> wrote:
> >>
> >> [...]
> >>
> >> >>     p = buf = alloca(total);

> >>
> >> [...]
> >>
> >> > the failure mode of alloca is SIGSEGV or some other malfunction and
> >> > there is no way to test for it


You should be able to cache a SIGSEGV if you are useing sigaltstack().
Never tested it though and don't know it it is useful at all.

...
> In this respect, there's no difference between alloca and static stack
> allocations.

...

Soo, the above is nearly the same as

char buf[total];
p = buf;

Why then use alloca()?

Regards,
/Karl Hammar

-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57