Hacker News new | ask | show | jobs
by pjmlp 2323 days ago
Funny, malloc() implemented that way is UB and doesn't work in all cases, specially when passing pointers around dynamic loaded libraries or threads.

So exit() gets to call longjmp() which definitely can only be done in Assembly, back to step 1.

1 comments

Isn't this how malloc was done on classic MacOS?
Classic MacOS was written in a mix of Assembly and Apple Pascal.

C was a guest language via MPW, and plugged into those APIs.