Hi, I want to know is there any alternative for sharing the memory between two modules. The approach which I can think of is taking a global pointer, using kmalloc and assigning start of memory to the global pointer and then in 2nd module use extern for using the same pointer. Is there any better way of doing the same ? BR, Abhinav
On Thu, 02 Aug 2018 23:12:23 +0530, Abhinav Misra said:
I want to know is there any alternative for sharing the memory between two modules.
Why are two modules trying to share memory? In general, each module should be managing its own data objects. If two modules need to share, maybe it really should be one merged module.... (And note that there's a number of kernel APIs for memory allocation and management, optimized for various use cases - so "what are you trying to share" and "why are you trying to share it" actually matter to get the code correct....
participants (2)
-
Abhinav Misra -
valdis.kletnieks@vt.edu