I am currently working on a linux device driver module which will create and allocate memory from a pool. I want to provide this memory to other modules and userspace. There are API(s) available like mempool_create(), kmalloc() and kmem_cache_create() but i am having issues with their maximum size these can allocate like from what i read kmalloc can allocate from 32bytes to 128KB but what about the other two? pool size would be more than 500MB. Also, To manage this pool i am using bookkeeping which is not feasable for large size. kindly provide some insight and suggestions. (also, this is my first question on stack overflow so I apologize if there are any mistakes or missing information. Thank you all for your understanding and support.)
I have tried simple implementation using kmalloc to allocate a pool and and array keeping in check which block/chunk is allocated or not and exporting a function to other modules.