search for: header_get

Displaying 2 results from an estimated 2 matches for "header_get".

2006 Mar 14
0
[LLVMdev] Re: Garbage collection questions
...d append 'deferred' to it */ BlockHeader *head; for (head = scan; head->field.next != NULL; head = head->field.next) {} head->field.next = deferred; } scan = deferred; deferred = NULL; } /* return the pointer to the allocation count for each object */ #define header_get(obj) (BlockHeader *)(obj - sizeof(BlockHeader)) #define obj_get(header) (void *)((void *)header + sizeof(BlockHeader)) /* increment the refcount in the header */ void refcnt_inc(void *obj) { if (obj != NULL) { BlockHeader *header = header_get(obj); unsigned *count = &header->field...
2006 Mar 14
3
[LLVMdev] Re: Garbage collection questions
Again, sorry for the delay. :( On Thu, 9 Mar 2006, Sandro Magi wrote: > I've written a reference-counting garbage collector for LLVM, but I'm > still unclear on a few things. Cool! > The following piece of code that appears on > http://llvm.cs.uiuc.edu/docs/GarbageCollection.html is unclear: > > ;; As the pointer goes out of scope, store a null value into > ;;