Skip to content

Commit

Permalink
Fix #631 (#633)
Browse files Browse the repository at this point in the history
* Fix #631

Add wrapper override for the Windows variant of maloc_usable_size : _msize

Co-authored-by: Matthew Parkinson <mjp41@users.noreply.github.com>
  • Loading branch information
Naville and mjp41 authored Sep 14, 2023
1 parent 35eef33 commit 6b8f333
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/snmalloc/override/malloc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ extern "C"
return snmalloc::libc::malloc_usable_size(ptr);
}

#ifdef _WIN32
SNMALLOC_EXPORT
size_t SNMALLOC_NAME_MANGLE(_msize)(MALLOC_USABLE_SIZE_QUALIFIER void* ptr)
{
return snmalloc::libc::malloc_usable_size(ptr);
}
#endif

SNMALLOC_EXPORT
size_t SNMALLOC_NAME_MANGLE(malloc_good_size)(size_t size)
{
Expand Down

0 comments on commit 6b8f333

Please sign in to comment.