|
|
On 2/17/19 9:39 PM, clipka wrote:
> Am 18.02.2019 um 00:41 schrieb William F Pokorny:
>
...
>>
>> OK. Surprised the heap allocation is slower than one on the stack. I
>> figured the allocation and free mechanisms were more or less the same
>> - just being a difference of where in memory it happened. Guess not?
>
> Definitely not.
>
Dick, Christoph, Thanks both for the helpful tutorials on stack operation.
...
>
> As a matter of fact, as I just discovered, C99 _does_ support such a
> thing; but it's not "flexible array member" but "variable length
> arrays"; and they can't be nested in structs, and C++ did not adopt them.
>
> One reason why C++ did not adopt them is some entirely unrelated
> fundamental stumbling block rooted in the C++ type concept. But I guess
> they might also mess up - or at least complicate - exception handling;
> "stack unwinding" would be the buzzword there.
This last I'd come across as I was thrashing around. I must have blended
the two features together as one in my mind...
Bill P.
Post a reply to this message
|
|