Hacker News new | past | comments | ask | show | jobs | submit login

instead of a length field, use a pointer to the last character. the length is the difference of these two pointers. The maximum string length is the size of your address space. Problem solved.

The problem is hardly solved. Your string length computation is already wrong - the length is the difference between those pointers plus one.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact