Subject: Re: posix_memalign vs USE_JEMALLOC
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Christos Zoulas <christos@zoulas.com>
List: tech-userlevel
Date: 11/26/2007 18:28:48
On Nov 27,  7:59am, yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote:
-- Subject: Re: posix_memalign vs USE_JEMALLOC

| > 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?

Yes, I just saw this 1/2 an hour ago and I have an updated copy of phkmalloc
that has a posix_memalign that compiles under netbsd. Now I need to test it.

Stay tuned,

christos