pSos partition with linux

Sep 21, 2006 1 Replies

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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required