3 ms·
malloc is a user level library function - c/c++ implementers can do what they like with it assume the downvote was from someone that malloc is a system call
by zabzonk 4y ago
malloc is a user level library function - c/c++ implementers can do what they like with it
assume the downvote was from someone that malloc is a system call
- loeg 4y agoI downvoted for the assumption that sbrk is involved in any way. It's an implementation detail of (some) historical malloc implementations, not some inherent aspect of all implementations. The entire thought experiment is faulty.
- tmtvl 4y agoRight, malloc uses mmap instead of sbrk, I'm an idiot. I really ought to read up on up-to-date implementation practices.