rui314 / 8cc

A Small C Compiler
MIT License
6.13k stars 740 forks source link

Add optional support for Boehm garbage collector. #60

Closed andrewchambers closed 9 years ago

andrewchambers commented 9 years ago

This is disabled by default. Adds support for make USEGC=true

rui314 commented 9 years ago

I'm not really excited about that. Technically, all you've got to do is to replace malloc with MALLOC and #define it as an alias for GC_malloc or malloc depending on USEGC flag. That's not hard, but maybe now is not a right time.

andrewchambers commented 9 years ago

I'll just keep the patches in my own branch. It's not totally needed, I agree. I just wanted to see how simple it is.

*Edit, your comment seems like you read this as an issue. This has the code too, but it is as you described anyway.

andrewchambers commented 9 years ago

FYI, I added this thinking about adding arm and raspberry pi support (I don't know if 256 MB system ram is an issue). We can revisit later.

rui314 commented 9 years ago

Ah, sorry, I read this as an issue indeed. But still maybe it's not a right time to do something practical yet.