[Mono-list] How are string constants stored?

Paolo Molaro lupus@ximian.com
Tue, 13 Aug 2002 15:58:10 +0200

On 08/12/02 Holger Arnold wrote:
> > > the Type column of an entry in the Constant meta-data table may contain
> > > ELEMENT_TYPE_STRING. The spec says that the Value column of this table
> > > contains an index into the Blob heap. Does this mean that to store a
> > > string constant, a #Blob heap entry must be created, that contains
> > > nothing more than an index into the #String or #US heap?
> >
> > No, the string contents are stored in the blob heap in this case.
> And in what format have string constants to be stored in the #Blob heap? With 
> PackedLen encoded length or null-terminated? UTF8 or UTF16?

UTF16. You can check the sources (either reflection.c, object.c or the


lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better