Skip to content

Commit

Permalink
Use ruby_xmalloc and ruby_xfree
Browse files Browse the repository at this point in the history
  • Loading branch information
konsolebox committed May 12, 2021
1 parent 908796b commit e6b0b3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/digest/xxhash/xxhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -1311,13 +1311,13 @@ XXH_PUBLIC_API XXH128_hash_t XXH128(const void* data, size_t len, XXH64_hash_t s
* @internal
* @brief Modify this function to use a different routine than malloc().
*/
static void* XXH_malloc(size_t s) { return malloc(s); }
static void* XXH_malloc(size_t s) { return ruby_xmalloc(s); }

/*!
* @internal
* @brief Modify this function to use a different routine than free().
*/
static void XXH_free(void* p) { free(p); }
static void XXH_free(void* p) { ruby_xfree(p); }

#include <string.h>

Expand Down

0 comments on commit e6b0b3e

Please sign in to comment.