Better is to use libast because its memory allocator allows switching between mmap(anon)/brk()/heap at runtime. Compile your application with -I/usr/include/ast -last and ln -s /usr/lib/libast.so.1 /usr/lib/libast.so
Olga On Sun, Feb 28, 2010 at 1:33 PM, Cyril Plisko <cyril.pli...@mountall.com> wrote: > On Sun, Feb 28, 2010 at 2:03 PM, Sad Clouds > <cryintotheblue...@googlemail.com> wrote: >> Hi, I've read some reports that calling mmap() on SMP systems can be >> slow. Solaris has quite a few memory allocators, which makes a bit hard >> to figure out the best memory allocation technique on SMP hardware. >> >> I have single threaded application, which allocates large chunks of >> memory (256K at a time) for caching data. This allocated memory can >> grow to several gigabytes in size. What do you think will give better >> performance on large SMP systems, calling mmap() or one of Solaris' >> general memory allocators? > > > You may want to experiment with libumem(3LIB) to see what performance > you'll get. The good thing is that you shouldn't even recompile your > application - just use LD_PRELOAD to do all the allocation through > libumem > > -- > Regards, > Cyril > _______________________________________________ > opensolaris-code mailing list > opensolaris-code@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/opensolaris-code > -- , _ _ , { \/`o;====- Olga Kryzhanovska -====;o`\/ } .----'-/`-/ olga.kryzhanov...@gmail.com \-`\-'----. `'-..-| / Solaris/BSD//C/C++ programmer \ |-..-'` /\/\ /\/\ `--` `--` _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code