[Devel] PKG and SHM memory

Weiter Leiter bp4mls at googlemail.com
Wed Nov 22 15:48:04 CET 2006

On 11/22/06, Eliot Gable <egable at broadvox.net> wrote:
> Could someone please explain what the difference is between PKG and SHM
> memory in terms of module development?

SHM cames from shared memory, while PKG from process private.

When would I want to use SHM over
> PKG memory or vice-versa?

When you need to keep some state over multiple requests, use SHM (because
you don't know what process will serve subsequent requests).

And why should we not just use standard C
> malloc?

Due to speed impact. However, if you need some big chunks of mem that will
remain 'static' from module init till shutdown, you can use libc's malloc.


Eliot Gable
> Operations Engineer
> CCNA, CWNA, CWSP, Network+, Security+
> Broadvox, LLC
> 1228 Euclid Avenue
> Suite 390
> Cleveland, OH 44115-1800
> 216-373-4808
> _______________________________________________
> Devel mailing list
> Devel at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openser.org/pipermail/devel/attachments/20061122/8e1d3f20/attachment.html

More information about the Devel mailing list