On Sun, 28 Feb 2010 13:45:05 +0100
casper....@sun.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?
> 
> If you want to free the data, then mmap() is probably the only way to
> do it; if you use a standard memory allocater, returning data will be 
> difficult.

OK thanks, I think this is a good argument for using mmap(). If the
user wants to dynamically decrease upper limit of cache memory, I can
call munmap() on cache pages and then rebuild hash table, without
restarting the server process.
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to