mpool.h (1173B)
1 /* 2 * Copyright 2017 Broadcom 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License, version 2, as 6 * published by the Free Software Foundation (the "GPL"). 7 * 8 * This program is distributed in the hope that it will be useful, but 9 * WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * General Public License version 2 (GPLv2) for more details. 12 * 13 * You should have received a copy of the GNU General Public License 14 * version 2 (GPLv2) along with this source code. 15 */ 16 /* 17 * $Id: mpool.h,v 1.2 Broadcom SDK $ 18 * $Copyright: (c) 2005 Broadcom Corp. 19 * All Rights Reserved.$ 20 */ 21 22 #ifndef __MPOOL_H__ 23 #define __MPOOL_H__ 24 25 struct mpool_mem_s; 26 typedef struct mpool_mem_s* mpool_handle_t; 27 28 extern int mpool_init(void); 29 extern mpool_handle_t mpool_create(void* base_address, int size); 30 extern void* mpool_alloc(mpool_handle_t pool, int size); 31 extern void mpool_free(mpool_handle_t pool, void* ptr); 32 extern int mpool_destroy(mpool_handle_t pool); 33 34 extern int mpool_usage(mpool_handle_t pool); 35 36 #endif /* __MPOOL_H__ */