2.5.3.2. build_AllocateStringTable()

[<<<] [>>>]

This function allocates space for the string table. The size of the string table is already determined during syntax analysis. The determined size should be enough. In some cases when there are repeated string constants the calculated sizte is bigger than the real one. In that case the larger memory is allocated and used, but only the really used part is written to the cache file.

If the program does not use any string constants then a dummy string table of length one byte is allocated.

void build_AllocateStringTable(pBuildObject pBuild,
                          int *piFailure
  ){

The first argument is the usual pointer to the "class" structure. The second argument is the result value. It can have two values:

The string table is allocated using the function alloc_Alloc. The string table is pointed by the class variable StringTable. The size of the table is stored in cStringTable


[<<<] [>>>]