2 ms·
Why not pascal strings? This worked for android. { uint Len; char str[0];}
by goalieca 11y ago
Why not pascal strings? This worked for android.
{ uint Len; char str[0];}
- rwmj 11y agoSee the discussion here: https://utcc.utoronto.ca/~cks/space/blog/programming/CNullStringsDefense https://utcc.utoronto.ca/~cks/space/blog/programming/CNullSt... Also why store the length twice? The whole point of my article is that malloc already stores the length, you don't need to store it over again.
- goalieca 11y agoThe idea it worked for android was that you get cache locality.