Re: g_malloc overhead
- From: Martín Vales <martin opengeomap org>
- To: BJörn Lindqvist <bjourne gmail com>
- Cc: gtk-devel-list gnome org, muppet <scott asofyet org>, gtk-app-devel-list gnome org
- Subject: Re: g_malloc overhead
- Date: Tue, 20 Jan 2009 09:01:24 +0100
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.
regards.
2009/1/18, muppet <scott asofyet org>:
On Jan 18, 2009, at 11:43 AM, Martín Vales wrote:
What are the advantages of use a glib_mem_vtable ???. I think we
have the same malloc function in all operating systems?
This vtable allows you to swap in a different allocator with next to
no effort. Maybe it has special OOM handling, or uses a special pool
or allocation algorithm tuned to your use-case, or does debugging
logging work, or whatever. The fact that the default is the same
everywhere is a bit beside the point of having the functionality.
--
Me: What's that in your mouth?
Zella: *swallows laboriously* Nothing.
Me: What did you just swallow?
Zella: A booger.
Me: Baby girl, don't eat boogers. That's gross.
Zella: But it was in my nose.
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]