Use of Memory Slices in N-ary Trees
- From: Manu Kaul <manu kaul gmail com>
- To: Gnome List <gtk-list gnome org>
- Subject: Use of Memory Slices in N-ary Trees
- Date: Fri, 25 Jun 2010 12:45:45 +0100
Hi All,
I was wondering if it was possible to use memory slices to allocate larger chunks of memory for a large n-ary tree, where both are being implemented using glib?
For new nodes in the N-ary tree, I only see a function like --> g_node_new but this might be doing a malloc every time it assigns a new node or does it do something smarter? I have noticed that the Glib Arrays and PointerArrays allow me to declare a new array and allocate it a chunk beforehand. How can I achieve the same using Glib for n-ary trees? Would be a great help if I could get a tip.
Cheers,
CBro
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]