Date: 01/10/01
- Next message: Boian Bonev: "[PHP-DEV] Re: PHP 4.0 Bug #8242 Updated: the date('B') gives bogus output when system date is Thu Dec 14 01:56:02 EET 20"
- Previous message: mark <email protected>: "[PHP-DEV] PHP 4.0 Bug #8495 Updated: Bug #6818 continued"
- In reply to: Stanislav Malyshev: "Re: [PHP-DEV] PHP4: php_module holds memory to long !"
- Next in thread: Stanislav Malyshev: "Re: [PHP-DEV] PHP4: php_module holds memory to long !"
- Reply: Stanislav Malyshev: "Re: [PHP-DEV] PHP4: php_module holds memory to long !"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Jan 10, 2001 at 09:23:43PM +0200, Stanislav Malyshev wrote:
> SS>> Thanks for the correction! I have never seen that in action
> SS>> though. Usually, the C library will keep freed memory in
> SS>> free lists and does not decrease the size of the data
> SS>> segment using sbrk.
>
> Actually, from glibc source there's a hook that is supposed to do this in
> some circumstances. Never could actually make it work in real life. Also,
> IIRC glibc on Linux allocates really large (8k+? 16k+?) blocks as mmap's
> of /dev/zero and those are really given back to system, since on free they
> are just munmap'ed.
Checked the glibc 2.2 sources, looks like 128k+ blocks are mmap'ed and
given back to the system.
How does Zend allocate memory then? I guess I could try to figure it
out myself, but it's a bit complex. Are there many small chunks? Seems
like emalloc() is called a lot creating small chunks, but each emalloc()
doesn't result in a corresponding malloc() perhaps? I guess with glibc
on Linux it would be nice if malloc() allocated say 128k chunks, and
emalloc() used memory inside those.
Stig
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Boian Bonev: "[PHP-DEV] Re: PHP 4.0 Bug #8242 Updated: the date('B') gives bogus output when system date is Thu Dec 14 01:56:02 EET 20"
- Previous message: mark <email protected>: "[PHP-DEV] PHP 4.0 Bug #8495 Updated: Bug #6818 continued"
- In reply to: Stanislav Malyshev: "Re: [PHP-DEV] PHP4: php_module holds memory to long !"
- Next in thread: Stanislav Malyshev: "Re: [PHP-DEV] PHP4: php_module holds memory to long !"
- Reply: Stanislav Malyshev: "Re: [PHP-DEV] PHP4: php_module holds memory to long !"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

