mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
zstd: Use memalloc(9) for calloc macro.
This is in contrib code but since we only have memalloc(9) in current we will not upstream this.
This commit is contained in:
parent
233933cb00
commit
d195572171
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327934
|
@ -46,7 +46,7 @@ MALLOC_DECLARE(M_ZSTD);
|
|||
#define malloc(x) (malloc)((x), M_ZSTD, M_WAITOK)
|
||||
#define free(x) (free)((x), M_ZSTD)
|
||||
/* in zstd's use of calloc, a is always 1 */
|
||||
#define calloc(a,b) (malloc)((a)*(b), M_ZSTD, M_WAITOK | M_ZERO)
|
||||
#define calloc(a,b) (mallocarray)((a), (b), M_ZSTD, M_WAITOK | M_ZERO)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Reference in a new issue