Subject: Re: posix_memalign vs USE_JEMALLOC
To: None <christos@astron.com>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-userlevel
Date: 11/27/2007 07:59:05
> In article <200711232224.XAA0000143647@zel459.zel.kfa-juelich.de>,
> Matthias Drochner  <M.Drochner@fz-juelich.de> 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?

YAMAMOTO Takashi