mpool.h (643B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 */ 7 8 #ifndef __MPOOL_H__ 9 #define __MPOOL_H__ 10 11 struct mpool_mem_s; 12 typedef struct mpool_mem_s* mpool_handle_t; 13 14 extern int mpool_init(void); 15 extern mpool_handle_t mpool_create(void* base_address, int size); 16 extern void* mpool_alloc(mpool_handle_t pool, int size); 17 extern void mpool_free(mpool_handle_t pool, void* ptr); 18 extern int mpool_destroy(mpool_handle_t pool); 19 20 extern int mpool_usage(mpool_handle_t pool); 21 22 #endif /* __MPOOL_H__ */