Re:The Linux Kernel Is Now VLA (Variable-Length Array) Free
by plasticchris on Monday October 29, 2018 @09:16AM
(#18327230)
Not all software written in c has a heap.
[ Parent
| on HN ]
Re:The Linux Kernel Is Now VLA (Variable-Length Array) Free
by megous on Monday October 29, 2018 @11:47AM
(#18328440)
Not all C programs have stack ether. Say Micochip's XC8 compiler for pic14 family.
Re:The Linux Kernel Is Now VLA (Variable-Length Array) Free
by rbanffy on Monday October 29, 2018 @12:38PM
(#18328857)
That has to be "fun" to work with...
Re:The Linux Kernel Is Now VLA (Variable-Length Array) Free
by megous on Tuesday October 30, 2018 @01:17PM
(#18338965)
You just can't recurse and the same function can't be called from isr and from main context at the same time. Basically, nothing is re-entrable. Otherwise it's quite fine. To be sure, you shouldn't be doing those things anyway if you have 64B of RAM and 512 words or ROM. :D
Re:The Linux Kernel Is Now VLA (Variable-Length Array) Free
by cesarb on Monday October 29, 2018 @01:35PM
(#18329357)
And even if it has a heap, the heap might not be available. In a kernel, the function might have been called in interrupt or atomic context; in userspace, the function might be part of the implementation of the heap itself, or a low-level function called before the heap is initialized.