GC and malloc question
GC and malloc question
- Subject: GC and malloc question
- From: Nick Rogers <email@hidden>
- Date: Thu, 31 May 2012 20:59:07 +0530
Hi,
My program has to build a tree structure, the number of nodes, in
which can run into many millions.
So I began to make changes to allocate a node using malloc. Earlier I
was using a object for a node.
I have GC enabled (required). And basically I'm making a linked list
of nodes to store children nodes.
The root node pointer is a member of a class and children nodes
pointer are stored in root node.
Immediately after malloc'ing a node I'm using Garbage Collector method
- disableCollectorForPointer, just to make sure, although GC is
supposed to work only on objects, if I'm right.
My question is: will GC affect the node allocations in anyway and,
also (GC or No GC) will the tree starting from a root node able to
stay in memory until I free it.
Because I'm getting EXC_BAD_ACCESS/KERN_PROTECTION_FAILURE, one after
the other.
Will using - disableCollectorForPointer have any effect on this.
Best,
Nick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden