From: Simon Richter (Simon.Richter_at_[hidden])
Date: 2007-04-25 04:47:50
Darren Garvey wrote:
>> First, memory fragmentation is a real problem. Apache spawns new child
>> processes with unfragmented memory maps every n requests to avoid this,
>> however you can only do this with an MMU. Since a lot of embedded
>> devices have none, people use pooled allocators and group related
>> allocations together in order to minimize the impact; ideally, there'd
>> be a way for allocations made while serving one request to use a
>> specific allocator instance (the default, of course, being the standard
>> new/delete allocator).
> This hadn't crossed my mind. Oops. Just to clarify, when you say:
> be a way for allocations made while serving one request to use a
> specific allocator instance', are you talking about providing such an
> allocator for _users_ of the library, or are you talking just about handling
> memory allocation internally?
The user of the library would provide the allocator, and the library
would "call back" into the user for memory allocation and deallocation.
The allocator would be per-request ideally, so that when we are using an
extension that allows handling of multiple simultaneous requests in the
same process (or fold the gateway code into the HTTPd, as is done on
some devices), we can keep the allocations made for each request separate.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk