O'Reilly logo

Compilers: Principles and Practice by Himanshu B. Dave, Parag H. Dave

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

D.4 Problems for Chapter 7: Run-Time Environment

D.4.1 Storage Allocation

Problem 4.1.19   We have seen a few language constructs – like variable length strings, dynamic arrays, nested and recursive procedures, etc. – that cannot be handled by static storage allocation. What other constructs cannot be handled by static storage allocation?

Solution:

  1. Explicit storage request and release (similar to malloc() and free() in C) at run-time.
  2. Run-time output format specifications, for example, as available in PL/I.

Problem 4.1.20   It is suggested that the value of variables be kept in the symbol table during runtime (as it was done in the original BASIC language implementations). Discuss advantages and disadvantages of this scheme. Are there any implementation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required