Hi

Dan Maas dmaas@dcine.com
Wed, 31 Oct 2001 03:32:32 -0500


Just an update here... I've already got LPSM up and running in my system...
Basically I have a large shared memory arena for sending blocks of data
between processes. I excised all of the transaction logging/SIGSEGV handling
bits from LPSM, so I am just using the allocator. For locking I just stuck
an flock() around the allocator entry points (allocation is infrequent in my
system so the overhead is negligible). The only thing that caused me trouble
was expanding the arena, since only the process that causes the expansion
will map the extended region. My solution was to check the arena size on
each access (which are also infrequent), and lpsm_expand() if necessary.

For now I've stayed with mapping the arena to a fixed address. I may have to
remove this limitation, or even use a "scatter/gather list" of discontiguous
fragments. I eventually must port my system to Windows (gulp) so this may be
important... (I'm willing to bet the Windows VM is not as flexible...)

A quick question- can you suggest some tuning parameters for the allocator?
I never allocate blocks smaller than 4KB or larger than 10MB; the most
typical situation will be a few hundred blocks of around 1MB each. Maybe I
don't even need the slab allocator?

Regards,
Dan