Re: Smart strings & memory allocation
| From: | Per Lundberg | Date: | Wed, 18 Jun 2003 13:33:24 +0000 |
| Subject: | Re: Smart strings & memory allocation | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-2364@lists.php.net to get a copy of this message | ||
On Wed, 2003-06-18 at 15:21, Stanislav Malyshev wrote:
> The number 80 was chosen because even if malloc allocates 128 bytes, these
> 128 bytes would be reused using the Zend memory cache. However, if the
> size of the segment does not allow it to be into the Zend memory cache,
> new malloc would be attempted each time. That was the primery rationale
> for the change, not the memory-saving argument, though it is important
> too.
How about including a malloc() implementation of your own? Doug Lea's
dmalloc comes to mind. That way, you should be able to get a much
higher level of control over how it allocates small blocks (which are
indeed very common in almost all computer programs).
--
Best regards,
Per Lundberg / Capio ApS
Phone: +46-18-4186040
Fax: +46-18-4186049
Web: http://www.nobolt.com
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc