reference count and memory allocation

1999-04-01 Thread Bill Cheng

Hello all,
I would like to ask some questions about compiler.
I know there are several techniques to implement storage management, like
reference count and garbage collection. Could anyone kindly give more details
on these? And if possible, could you give some code and explain in detail?
And does anyone know the algorithms on memory allocation and memory fragment
collection? Could you tell me in detail or give me links on the net that I can
go on further?
Thank you.
 
 
 
Bill


Get free e-mail and a permanent address at http://www.netaddress.com/?N=1



C compilation principle

1999-01-25 Thread Bill cheng




Hello,I am studying compiling principle of C 
programming, but I have no idea where I can start with. For example, how can it 
parse the text input by a user?To make the problem clearer, I will take an 
example. Say you have an expression, like (a1.5) OR (b='abc') AND (2 
of (c0, NOT(d1), (e='cde') AND (f+g*h/i1))... (the 
expression: 2 of (c0, NOT(d1), (e='cde') AND (f+g*h/i1) means when 2 
expressions in the brackets are true, the expression is true). When input by 
user, those a, b, c,d will be replaced by real value, like (11.5) OR 
('cde'='abc') AND (2 of (10, NOT(51), ('cde'='cde') AND 
(4+8*2/31)). You must compute the result of the expression. Do you 
know what I mean?What I want to know is whether you could kindly give me 
some enlightenment. I really do not know what technique to use to parse the 
expression, and how to use some data structure to compute the result, (using a 
linked list, or something else, and also paying attention to the priority of the 
operator.)Any real implementation or information resource will be 
appreciated.


Cheng Xom