3 ms·
Not all software written in c has a heap.
by plasticchris 8y ago
Not all software written in c has a heap.
- megous 8y agoNot all C programs have stack ether. Say Micochip's XC8 compiler for pic14 family.
- rbanffy 8y agoThat has to be "fun" to work with...
- megous 8y agoYou 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
- cesarb 8y agoAnd 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.