| 1 | // Copyright (c) 2020-2024 Joe Conigliaro. All rights reserved. |
| 2 | // Use of this source code is governed by an MIT license |
| 3 | // that can be found in the LICENSE file. |
| 4 | module cleanc |
| 5 | |
| 6 | import os |
| 7 | |
| 8 | fn (g &Gen) print_cgen_mem(stage string) { |
| 9 | if os.getenv('V2_MEM') == '' { |
| 10 | return |
| 11 | } |
| 12 | $if macos { |
| 13 | eprintln(' [mem] cleanc/${stage}: live ${darwin_cleanc_live_mb()} MB') |
| 14 | } $else { |
| 15 | eprintln(' [mem] cleanc/${stage}') |
| 16 | } |
| 17 | } |
| 18 |