Related articles |
---|
What's wrong with alloca() ? preston@dawn.cs.rice.edu (1991-12-19) |
Re: What's wrong with alloca() ? apang@mindlink.bc.ca (1991-12-15) |
Re: What's wrong with alloca() ? pardo@cs.washington.edu (1991-12-21) |
Re: What's wrong with alloca() ? preston@dawn.cs.rice.edu (1991-12-22) |
Re: What's wrong with alloca() ? wjw@eb.ele.tue.nl (1991-12-23) |
Re: What's wrong with alloca() ? David.Chase@Eng.Sun.COM (1991-12-23) |
Re: What's wrong with alloca() ? pcg@aber.ac.uk (1991-12-26) |
Re: What's wrong with alloca() ? wicklund@intellistor.com (1991-12-30) |
Re: What's wrong with alloca() ? wws@renaissance.cray.com (1991-12-30) |
Re: What's wrong with alloca() ? jfc@athena.mit.edu (1991-12-31) |
Re: What's wrong with alloca() ? GORMAN_B@prime1.lancashire-poly.ac.uk (Barry Gorman) (1992-01-03) |
Re: What's wrong with alloca() ? rankin@eql.caltech.edu (1992-01-05) |
Re: What's wrong with alloca() ? pcg@aber.ac.uk (1992-01-05) |
Re: What's wrong with alloca() ? barmar@think.com (1992-01-06) |
Newsgroups: | comp.compilers |
From: | wicklund@intellistor.com (Tom Wicklund) |
Keywords: | storage |
Organization: | Compilers Central |
References: | 91-12-075 91-12-081 |
Date: | Mon, 30 Dec 91 10:17:54 MST |
Control Data's internal development language CYBIL had both an alloca type
structure and malloc type allocation within a fixed region.
The PUSH statement allocates storage which was freed on procedure exits.
I believe most implementations merely decrement the stack pointer,
providing a very low cost method of allocating structures whose size
varied at runtime.
CYBIL also had method of declaring a block of memory and allocating and
freeing that area as a distinct heap. Complementing this was the concept
of "relative pointers", basically an offset from a base location (which
was dereferenced using both the pointer and the base). I don't recall the
syntax and may be mistaken on exact semantics since all of this is from
work I did 7 years ago.
The CYBIL facilities of heap allocation within a memory block and relative
pointers allows complex data structures which include pointers to be
written to disk and read back -- just read the block which everything is
allocated within. Relative pointers don't need to be adjusted since they
don't contain absolute addresses. I assume this is what the feature was
used for.
Afraid I don't have any references, however I'm sure the CYBIL language
definition is available from Control Data.
[Relative pointers sound like PL/I OFFSET pointers, a useful feature. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.