httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Robert S. Thau)
Subject Re: SYSV Shared Memory (Was: Re: vote status)
Date Fri, 16 Feb 1996 20:21:35 GMT
  My crude solution at the time was to malloc(1000000), then shmat(), then
  free(). Not all that suitable really.

[Catching up on old email...]

Hmmm... most malloc()s I have experience with will *not* return freed
space to the system pool, meaning that if you malloc() a megabyte, and
then subsequently free it, that process (and all of its descendants)
will have a data segment of at least a megabyte in size forevermore.
Obviously, if thirty or forty copies of the thing are going to be
running simultaneously, this is not good.

A sequence along the lines of sbrk/shmat/sbrk-back might be a better
fit... that at least has a *chance* of returning the reserved space
back to the system.

Then again, I haven't played with SysV much...


View raw message