Previous 15994 Revisions Next

r1331 Sunday 25th November, 2007 at 00:00:48 UTC by Nathan Woods
[Windows] Implementing proper support for _msize on non-tracked winalloc
[src/osd/windows]winalloc.c

src/osd/windows/winalloc.c
r1330r1331
383383
384384size_t CLIB_DECL _msize(void *memory)
385385{
386   memory_entry *entry = find_entry(memory);
387   if (entry == NULL)
386   size_t result;
387
388   if (use_malloc_tracking())
388389   {
389      if (winalloc_in_main_code)
390      memory_entry *entry = find_entry(memory);
391      if (entry == NULL)
390392      {
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;
393399      }
394      return 0;
400      result = entry->size;
395401   }
396   return entry->size;
402   else
403   {
404      result = GlobalSize(memory);
405   }
406   return result;
397407}
398408
399409

Previous 15994 Revisions Next


© 1998-2018 The MESS Team