On 11/22/06, Eliot Gable <[EMAIL PROTECTED]> 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.

WL.

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
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/devel

_______________________________________________
Devel mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to