55
edits
| Line 67: | Line 67: | ||
=== Sample instance data === | === Sample instance data === | ||
This is a sample representation of instance data, just to illustrate the concept. In this sample, a String instance would occupy between 8+n (direct data) and 16 bytes. | This is a sample representation of instance data, just to illustrate the concept. In this sample, a String instance would occupy between 8+n (direct data) and 16 bytes, assuming 4-byte pointers. The first 64 bits would be the lengths and the bits-and-flags field, followed by aligned pointers. | ||
We need to discuss whether strings should be 0-terminated. Processing a string buffer with C/C++ routines would be much easier if it did. Also, in debug mode, the display of a string is easier. | We need to discuss whether strings should be 0-terminated. Processing a string buffer with C/C++ routines would be much easier if it did. Also, in debug mode, the display of a string is easier. | ||
edits