On Tue, Jan 20, 2009 at 12:48 PM, Larry Reaves <la...@yrral.net> wrote: > On Tue, 2009-01-20 at 09:01 +0100, Martín Vales wrote: >> BJörn Lindqvist escribió: >> > Actually, a custom allocator could be useful even in the general case. >> > Malloc is a system call and has quite bad performance on certain >> > platforms (windows in particular i think). Something like the gslice >> > allocator could >> > Probably improve performance a bit. >> > >> gslice i believe use malloc internally. I believe you always need >> malloc/new-(C/C++) because you depend on ms Windows API. >> >> I am not sure if you can build your own malloc because you depend on the >> operating system. > Sure, you must malloc to get new memory, but you can malloc bigger than > what you need and hand out the extra memory later at a much lower cost. > I recall reading somewhere that mmap can be used to build custom memory allocators. If that's true than one can bypass malloc. I think that you can request memory through mmap by using MAP_ANONYMOUS.
Emmanuel Rodriguez _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list