On Tue, 27 Apr 2010 22:48:50 +0100
James Peacock <[email protected]> wrote:

> If you have lots smallish objects with a wide range of lifetimes you 
> can massively reduce fragmentation by using a pool allocator of some 
> sort to collect objects of a similar lifetimes into larger chunks of 
> memory. I've seen techniques such has this solve address space 
> fragmentation issues we had with a project on 32 bit linux. In the 
> case of RISC OS, the C runtime won't give the memory back, but at 
> least it will be less fragmented and, hopefully, the total memory
> used will be less.

My understanding is that UnixLib already includes such a slab
allocator.  (It uses dlmalloc, which is the same library glibc under
Linux uses.)

> Also, having lots of DAs filling up the address space is probably not 
> going to play well with RISC OS 5 which reserves a larger chunk of
> the address space for applications (up to 1 GB?)

We already have lots of DAs.  The address space issue only becomes a
problem if you're over-zealous with how large the DAs are allowed to
grow.

B.

Reply via email to