Comment on Why malloc always does more than I asked for?parentComments−dn35001moYour test is backwards. I would write it like this: if (size > a->limit - a->cursor) return NULL;−CodesInChaos1moYou're right. Fixed.
Comments
Your test is backwards. I would write it like this:
You're right. Fixed.