Skip to content

Commit f95bf57

Browse files
committed
Add umfCoarseMemoryProviderParamsDefault()
Signed-off-by: Lukasz Dorau <[email protected]>
1 parent 61ee65e commit f95bf57

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

include/umf/providers/provider_coarse.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#define UMF_COARSE_PROVIDER_H
1010

1111
#include <stdbool.h>
12+
#include <string.h>
13+
1214
#include <umf/memory_provider.h>
1315

1416
#ifdef __cplusplus
@@ -98,6 +100,15 @@ umf_memory_provider_ops_t *umfCoarseMemoryProviderOps(void);
98100
coarse_memory_provider_stats_t
99101
umfCoarseMemoryProviderGetStats(umf_memory_provider_handle_t provider);
100102

103+
/// @brief Create default params for the coarse memory provider
104+
static inline coarse_memory_provider_params_t
105+
umfCoarseMemoryProviderParamsDefault(void) {
106+
coarse_memory_provider_params_t coarse_memory_provider_params;
107+
memset(&coarse_memory_provider_params, 0,
108+
sizeof(coarse_memory_provider_params));
109+
return coarse_memory_provider_params;
110+
}
111+
101112
#ifdef __cplusplus
102113
}
103114
#endif

0 commit comments

Comments
 (0)