forked from hrbrmstr/tdigest
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[add] Add the ability to change allocator at compile time
- Loading branch information
1 parent
7f63be1
commit b8db533
Showing
2 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* Adaptive histogram based on something like streaming k-means crossed with Q-digest. | ||
* The implementation is a direct descendent of MergingDigest | ||
* https://github.com/tdunning/t-digest/ | ||
* | ||
* Copyright (c) 2021 Filipe Oliveira, All rights reserved. | ||
* | ||
* Allocator selection. | ||
* | ||
* This file is used in order to change the t-digest allocator at compile time. | ||
* Just define the following defines to what you want to use. Also add | ||
* the include of your alternate allocator if needed (not needed in order | ||
* to use the default libc allocator). */ | ||
|
||
#ifndef TD_ALLOC_H | ||
#define TD_ALLOC_H | ||
#define __td_malloc malloc | ||
#define __td_realloc realloc | ||
#define __td_free free | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters