actually deallocate the object */
| 2812 | |
| 2813 | /* actually deallocate the object */ |
| 2814 | staticfn void |
| 2815 | dealloc_obj_real(struct obj *obj) |
| 2816 | { |
| 2817 | if (obj->oextra) |
| 2818 | dealloc_oextra(obj); |
| 2819 | |
| 2820 | /* clear out of date information contained in the about-to-become |
| 2821 | stale memory so that potential used-after-freed bugs (should never |
| 2822 | happen) might trigger an object lost panic instead of continuing; |
| 2823 | linking with a debugging malloc library is likely to do something |
| 2824 | similar so this is mainly useful for ordinary malloc/free */ |
| 2825 | *obj = cg.zeroobj; |
| 2826 | free((genericptr_t) obj); |
| 2827 | } |
| 2828 | |
| 2829 | /* free all the objects marked for deletion */ |
| 2830 | void |
no test coverage detected