| 133 | |
| 134 | #if defined DEBUG || defined INFO |
| 135 | static void liballoc_dump() |
| 136 | { |
| 137 | # ifdef DEBUG |
| 138 | struct liballoc_major *maj = l_memRoot; |
| 139 | struct liballoc_minor *min = NULL; |
| 140 | # endif |
| 141 | |
| 142 | printf("liballoc: ------ Memory data ---------------\n"); |
| 143 | printf("liballoc: System memory allocated: %i bytes\n", l_allocated); |
| 144 | printf("liballoc: Memory in used (malloc'ed): %i bytes\n", l_inuse); |
| 145 | printf("liballoc: Warning count: %i\n", l_warningCount); |
| 146 | printf("liballoc: Error count: %i\n", l_errorCount); |
| 147 | printf("liballoc: Possible overruns: %i\n", l_possibleOverruns); |
| 148 | |
| 149 | # ifdef DEBUG |
| 150 | while (maj != NULL) |
| 151 | { |
| 152 | printf("liballoc: %x: total = %i, used = %i\n", |
| 153 | maj, |
| 154 | maj->size, |
| 155 | maj->usage); |
| 156 | |
| 157 | min = maj->first; |
| 158 | while (min != NULL) |
| 159 | { |
| 160 | printf("liballoc: %x: %i bytes\n", |
| 161 | min, |
| 162 | min->size); |
| 163 | min = min->next; |
| 164 | } |
| 165 | |
| 166 | maj = maj->next; |
| 167 | } |
| 168 | # endif |
| 169 | |
| 170 | FLUSH(); |
| 171 | } |
| 172 | #endif |
| 173 | |
| 174 | // *************************************************************** |
no test coverage detected