[Devel] PKG and SHM memory
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
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.
> Operations Engineer
> CCNA, CWNA, CWSP, Network+, Security+
> Broadvox, LLC
> 1228 Euclid Avenue
> Suite 390
> Cleveland, OH 44115-1800
> Devel mailing list
> Devel at openser.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Devel