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

Which you can fix by storing an unsigned long at the front of the string which holds the size.

If it would overflow, you just set the long to the max size, byte the bullet and read the entire string. If you are using a dynamic language just throw whatever InfinitelyLargeNumber class it has in the size column and you're good.

If you're worried about ram that much you can just use plain strings when you need to.




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

Search: