In pSos a partition is a block of memory divided into a set of equal sized buffers (pt_create, pt_getbuf, etc). Is there a Linux tool object or library for managing shared memory like a pSos partition?
Thanks a lot Alberto
In pSos a partition is a block of memory divided into a set of equal sized buffers (pt_create, pt_getbuf, etc). Is there a Linux tool object or library for managing shared memory like a pSos partition?
Thanks a lot Alberto
The closest match in Linux is a memory pool (linux/mempool.h), starting somewhere in 2.5.x.
However, you can effectively ignore that and implement your pSOS calls with kmalloc/kfree. The Linux memory allocation is very efficient and if you use a lot of same-size objects fragmentation is not much of an issue either.
In userspace, the closest equivalent to a pSOS process is a Linux thread. You don't need anything special to share memory between them. Here, as well, you can re-implement the pSOS calls with simple malloc/free.
Kind regards,
Iwo
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.