Skip to content

Commit c0ee8e3

Browse files
committed
feat allocator: added malloc zalloc class templates
Signed-off-by: John Sanpe <sanpeqf@gmail.com>
1 parent 9fee55f commit c0ee8e3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

include/bfdev/allocator.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,18 @@ BFDEV_DEFINE_CLEAN(bfdev_free, void *,
132132
bfdev_free(BFDEV_NULL, _T);
133133
)
134134

135+
BFDEV_DEFINE_CLASS(bfdev_malloc, void *,
136+
bfdev_malloc(BFDEV_NULL, size),
137+
bfdev_free(BFDEV_NULL, _T),
138+
bfdev_size_t size
139+
)
140+
141+
BFDEV_DEFINE_CLASS(bfdev_zalloc, void *,
142+
bfdev_zalloc(BFDEV_NULL, size),
143+
bfdev_free(BFDEV_NULL, _T),
144+
bfdev_size_t size
145+
)
146+
135147
BFDEV_END_DECLS
136148

137149
#endif /* _BFDEV_ALLOCATOR_H_ */

0 commit comments

Comments
 (0)