Home bvckup hamachi yafe halloc bff libppf dnsfix sign Hierarchical Allocator Hierarchical allocator (halloc) is an extension to a standard malloc/free interface that simplifies tasks of memory disposal in situations when allocated structures exhibit hierarchical properties. Overview Memory blocks allocated through halloc can be organized into a hierarchy of parent-child relationships. These relationships are taken into an account when memory block is being freed - disposing the block automatically frees all its children in a recursive way. For example: struct foo * p = h_malloc(sizeof(*p)); struct bar * q = h_calloc(sizeof(*q), 10); struct tmp * r = h_calloc(sizeof(*r), 20); hattach(q, p); /* q is now a child of p */ hattach(r, q); /* r is now a child of q and a grandchild of p */ h_free(p); The h_free() call disposes not just the 'p' block, but the 'q' and 'r' blocks as well. Download Latest version of fast and portable implementation is 1.2.0, released May 18, 2004: halloc-1.2
Archives Contact AlternateIdea July 11th, 2009 Introducing HTTPRiot - Easily Consume REST Resources on the iPhone and OS X 2 comments on 1754 words If you’ve ever tried to do networking with Foundation you know that wrestling with NSURLConnection and NSURLRequest can be painful. Thankfully, we’ve seen a few third party tools step up to alleviate some of this pain. I want to introduce you to a couple of those tools and show you what I’ve been working on as well. UPDATED: Fixed the permission issue on the download link The current crop of tools There are some excellent HTTP libraries available for the iPhone and OS X. So why do we need another one? Balance. There are two particularly popular libraries that I’m going to talk about: ASIHTTPRequest and ObjectiveResource. I’ll explain the benefits and tradeoffs of each and also explain where HTTPRiot fits in to this equation. ASIHTTPRequest ASIHTTPRequest is a highly flexible lower level tool (relative to HTTPRiot & ObjectiveResource).