| 214 | } |
| 215 | |
| 216 | void mem_debug_dump(IOHANDLE file) |
| 217 | { |
| 218 | char buf[1024]; |
| 219 | MEMHEADER *header = first; |
| 220 | if(!file) |
| 221 | file = io_open("memory.txt", IOFLAG_WRITE); |
| 222 | |
| 223 | if(file) |
| 224 | { |
| 225 | while(header) |
| 226 | { |
| 227 | str_format(buf, sizeof(buf), "%s(%d): %d", header->filename, header->line, header->size); |
| 228 | io_write(file, buf, strlen(buf)); |
| 229 | io_write_newline(file); |
| 230 | header = header->next; |
| 231 | } |
| 232 | |
| 233 | io_close(file); |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | |
| 238 | void mem_copy(void *dest, const void *source, unsigned size) |
nothing calls this directly
no test coverage detected