I was trying to look at the behavior of the new allocator and why it doesn't place data contiguously. 

My code:

struct ci {
    char c;
    int i;
}

template &lt;typename T&gt;
void memTest()
{
    T * pLast = new T();
    for(int i = 0; i &lt; 20; ++i) {
         T * pNew = new T();
         cout &lt;&lt; (pNew - pLast) &lt;&lt; " ";
         pLast = pNew;
    }
}


So I ran this with char, int, ci. Most allocations were a fixed length from the last, sometimes there were odd jumps from one available block to another.

sizeof(char) : 1
Average Jump: 64 bytes

sizeof(int): 4
Average Jump: 16

sizeof(ci): 8 (int has to be placed on a 4 byte align)
Average Jump: 9

Can anyone explain why the allocator is fragmenting memory like this? Also why is the jump for char so much larger then ints and a structure that contains both an int and char.  


Question: "How big of a problem" vs. "how big a problem"
Answer: What about "not that high (of) a fence"? "not that red (of) a heart" "not that smart (of) a person? not that big (of) a problem?

I would argue that if you use the word that to qualify the adjective, the of is in fact necessary to convey the meaning of comparison of a specific entity to the class of general entities to which it belongs.

I'm sure the usage can be regional, as well. There is no hard and fast rule.

EDIT

Hey, I did some more research. Dictionary.com has the following usage note for "of" :


  Of  is sometimes added to phrases beginning with the adverb how or too followed by a descriptive adjective: How long of a drive will it be? It's too hot of a day for tennis.  This construction is probably modeled on that in which how  or too  is followed by much,  an unquestionably standard use in all varieties of speech and writing: How much of a problem will that cause the government? There was too much of an uproar for the speaker to be heard.  The use of of with descriptive adjectives after how  or too  is largely restricted to informal speech. It occurs occasionally in informal writing and written representations of speech.


So, I suppose that's the reason why adjectives other than "much" combined with "of" sound odd to your ear. I believe "that" can be included with "how" or "too" in this synopsis. Replacing "much" with another adjective occurs occasionally in informal writing and in speech, but isn't unquestionably standard.

When I say these constructions out loud, to me, I often want to insert the of but perhaps that has something more to say about the informality of my speech rather than the correctness of the construction. :)