pika-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pika-dev] hackerlab fsplay.[ch] status


From: Andreas Rottmann
Subject: Re: [Pika-dev] hackerlab fsplay.[ch] status
Date: Fri, 07 May 2004 02:10:30 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Tom Lord <address@hidden> writes:

>     > From: Andreas Rottmann <address@hidden>
>
>     > I've started porting the GLib memchunk implementationn to
>     > hackerlab. 
>
> Why?
>
[snip]

Now that I did speed tests on alloc and free memchunks, I was not all
that convinced they make sense anymore (they are noticably slower than
malloc()/free()). However, I have now optimized the memchunk as not to
use binary trees but bit masking and posix_memalign(3) (suggested by
Owen Taylor on #gtk+) to find the area for a block, and now the speed
is about the same as for malloc()/free().

> What's the case for having this facility?
>
Well, glibc (so I've heard) imposes a 4-byte overhead on each
allocated piece of memory (it has to know the size). I thought we'd
want to save that for object data areas, since hashq values might be
used *very* often (additionally, with lim_malloc(), when using limits,
the overhead increases by another 4 bytes).

Andy
-- 
Andreas Rottmann         | address@hidden      | address@hidden | address@hidden
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Make free software, not war!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]