Re: [Vala] array memory leak?
- From: Jürg Billeter <j bitron ch>
- To: Ulink <ulink gmx at>
- Cc: Vala Mailing <vala-list gnome org>
- Subject: Re: [Vala] array memory leak?
- Date: Fri, 07 Mar 2014 13:06:27 +0100
On Fri, 2014-03-07 at 12:49 +0100, Ulink wrote:
glibc does not and cannot immediately return every freed block back to
the system. Some blocks cannot be freed because they are just gaps
between heap-allocated regions and some blocks are intentionally not
freed to speed up following allocations.
Damn! My background is embedded programming and I'm relatively new to
Vala/GLib so I thought "g_free" is only an other name or a very thin
wrapper for "free".
I really think this is the solution.
'g_free' _is_ (normally) just a wrapper for 'free'. Please note that I'm
talking about glibc, not GLib.
There is also a memory allocator in GLib, GSlice, which can have its own
share of internal fragmentation. However, that's not used for plain
strings and arrays.
Regards,
Jürg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]