Re: memory allocation and powers of two

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Schultz <dschultz(at)uclink(dot)Berkeley(dot)EDU>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: memory allocation and powers of two
Date: 2003-08-28 16:30:21
Message-ID: 25925.1062088221@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Schultz <dschultz(at)uclink(dot)Berkeley(dot)EDU> writes:
> While looking into a block size mismatch problem between
> Postgresql and FreeBSD's FFS, I noticed that postgresql is making
> some rather odd-sized requests to malloc(3): 0x2034, 0x2020,
> 0x4018, 0x8018, etc.

AFAICT the operative word there is "some" --- the heavily used paths
should make power-of-two requests to malloc, because aset block sizes
will normally be powers of two. Can you put your finger on paths that
generate a significant number of non-power-of-two requests?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Matt Clark 2003-08-28 16:37:24 Re: Hardware recommendations to scale to silly load
Previous Message Matt Clark 2003-08-28 16:29:39 Re: Hardware recommendations to scale to silly load