Subject: Re: posix_memalign vs USE_JEMALLOC
To: None <>
From: YAMAMOTO Takashi <>
List: tech-userlevel
Date: 11/27/2007 07:59:05
> In article <>,
> Matthias Drochner  <> wrote:
> >
> >Hi -
> >it seems that one can't just switch the malloc() implementation
> >anymore to compare or track down user program problems: jemalloc
> >provides posix_memalign(), and userlevel programs are picking
> >it up, while phkmalloc doesn't support it.
> >So what to do --
> >-implement a (probably less effective) posix_memalign() on phkmalloc,
> That is pretty difficult to do. I looked into it, and it could be
> done if alignment < pagesize and we always allocate new pages for
> posix_memalign calls. This will make us run out of memory soon :-(

have you checked freebsd's phkmalloc, which iirc got posix_memalign
before being replaced with jemalloc?