P
Size: a a a
P
DF
p
p
DF
P
p
P
Т8
DF
AZ
AZ
P
AZ
p
AZ
r
r
DS
The rest of this dissertation presents a novel approach to memory management: as static as
possible (asap). Asap is fully automatic: programmers are oblivious to the memory management
just like with a gc. Asap is agnostic of the memory representation which can be taken care of by
the programmers when necessary and left to the compiler otherwise. To provide these properties,
asap analyses the program to detect value usage (at which points of the program are which values
accessed) and aliasing (in what way which values alias). Based on this information, asap inserts
instructions within the program to deallocate memory when appropriate. For the cases when it is
not possible to decide at compile time if the memory representing a value can be safely reclaimed,
asap inserts specialised code that will determine safety during execution. Interestingly, because
the type of values is known when the code is generated, it is able to scan and deallocate values
without runtime types nor tags.
AZ