src/osd/windows/winalloc.c
| r1330 | r1331 | |
| 383 | 383 | |
| 384 | 384 | size_t CLIB_DECL _msize(void *memory) |
| 385 | 385 | { |
| 386 | | memory_entry *entry = find_entry(memory); |
| 387 | | if (entry == NULL) |
| 386 | size_t result; |
| 387 | |
| 388 | if (use_malloc_tracking()) |
| 388 | 389 | { |
| 389 | | if (winalloc_in_main_code) |
| 390 | memory_entry *entry = find_entry(memory); |
| 391 | if (entry == NULL) |
| 390 | 392 | { |
| 391 | | fprintf(stderr, "Error: msize a non-existant block\n"); |
| 392 | | osd_break_into_debugger("Error: msize a non-existant block"); |
| 393 | if (winalloc_in_main_code) |
| 394 | { |
| 395 | fprintf(stderr, "Error: msize a non-existant block\n"); |
| 396 | osd_break_into_debugger("Error: msize a non-existant block"); |
| 397 | } |
| 398 | return 0; |
| 393 | 399 | } |
| 394 | | return 0; |
| 400 | result = entry->size; |
| 395 | 401 | } |
| 396 | | return entry->size; |
| 402 | else |
| 403 | { |
| 404 | result = GlobalSize(memory); |
| 405 | } |
| 406 | return result; |
| 397 | 407 | } |
| 398 | 408 | |
| 399 | 409 | |