Jump to page: 1 2
Thread overview
new C 8.30.1 beta
Aug 09, 2002
Walter
Aug 09, 2002
Jan Knepper
Aug 09, 2002
Walter
Aug 09, 2002
Jan Knepper
Aug 09, 2002
Matthew Wilson
Aug 09, 2002
Walter
Aug 09, 2002
Matthew Wilson
Aug 09, 2002
Walter
Aug 11, 2002
Matthew Wilson
Aug 12, 2002
Walter
VLA's Re: new C 8.30.1 beta
Aug 30, 2002
damiandixon
Aug 30, 2002
Walter
August 09, 2002
with VLA's.

www.digitalmars.com/dmc/dmcppDownload.html




August 09, 2002
Hey I thought you were back to D! <g>



Walter wrote:

> with VLA's.
>
> www.digitalmars.com/dmc/dmcppDownload.html

August 09, 2002
C99 VLAs fit in with the discussion on arrays in D, so I thought I'd gain some experience with them for comparison. Besides, they didn't look too hard to do <g>.

"Jan Knepper" <jan@smartsoft.cc> wrote in message news:3D53168B.2B22E091@smartsoft.cc...
> Hey I thought you were back to D! <g>
>
>
>
> Walter wrote:
>
> > with VLA's.
> >
> > www.digitalmars.com/dmc/dmcppDownload.html
>


August 09, 2002
Walter wrote:

> C99 VLAs fit in with the discussion on arrays in D, so I thought I'd gain some experience with them for comparison. Besides, they didn't look too hard to do <g>.

Well, we're delighted to have it!
Jan


August 09, 2002
What happens if the requested size exceeds the heap capacity?

"Walter" <walter@digitalmars.com> wrote in message news:aiv2nm$47b$1@digitaldaemon.com...
> with VLA's.
>
> www.digitalmars.com/dmc/dmcppDownload.html
>
>
>
>


August 09, 2002
You should get a 'Stack Overflow' message. Note that although VLAs are implemented for the 16 bit memory models, they are rather useless because of the extremely limited stack space.

"Matthew Wilson" <matthew@thedjournal.com> wrote in message news:aivpt4$t4j$1@digitaldaemon.com...
> What happens if the requested size exceeds the heap capacity?
>
> "Walter" <walter@digitalmars.com> wrote in message news:aiv2nm$47b$1@digitaldaemon.com...
> > with VLA's.
> >
> > www.digitalmars.com/dmc/dmcppDownload.html



August 09, 2002
So the Stack Overflow is part of the standard?

Also, do you allocate the memory from the stack (a la alloca()), or from the
heap?

"Walter" <walter@digitalmars.com> wrote in message news:aivq28$tpt$1@digitaldaemon.com...
> You should get a 'Stack Overflow' message. Note that although VLAs are implemented for the 16 bit memory models, they are rather useless because
of
> the extremely limited stack space.
>
> "Matthew Wilson" <matthew@thedjournal.com> wrote in message news:aivpt4$t4j$1@digitaldaemon.com...
> > What happens if the requested size exceeds the heap capacity?
> >
> > "Walter" <walter@digitalmars.com> wrote in message news:aiv2nm$47b$1@digitaldaemon.com...
> > > with VLA's.
> > >
> > > www.digitalmars.com/dmc/dmcppDownload.html
>
>
>


August 09, 2002
"Matthew Wilson" <matthew@thedjournal.com> wrote in message news:aivr4k$12hn$1@digitaldaemon.com...
> So the Stack Overflow is part of the standard?

I couldn't find anything in the standard about what happens if the allocation fails.

> Also, do you allocate the memory from the stack (a la alloca()), or from
the
> heap?

It generates a call to alloca().


August 11, 2002
It's bad that there seems to be no direction from the standards as to what happens during allocation failure. Makes writing standard compliant code more difficult. I must have a read of the standard when I get a spare minute (in about 3 years!)

It's good that you're allocating from the stack. Is that itself (as opposed to getting from the heap) part of the standard? I seem to recall that it should be allocated from the heap, but the memory is vague.

"Walter" <walter@digitalmars.com> wrote in message news:aj0ri7$2erk$1@digitaldaemon.com...
>
> "Matthew Wilson" <matthew@thedjournal.com> wrote in message news:aivr4k$12hn$1@digitaldaemon.com...
> > So the Stack Overflow is part of the standard?
>
> I couldn't find anything in the standard about what happens if the allocation fails.
>
> > Also, do you allocate the memory from the stack (a la alloca()), or from
> the
> > heap?
>
> It generates a call to alloca().
>
>


August 12, 2002
"Matthew Wilson" <matthew@thedjournal.com> wrote in message news:aj6raq$2mb4$1@digitaldaemon.com...
> It's bad that there seems to be no direction from the standards as to what happens during allocation failure. Makes writing standard compliant code more difficult. I must have a read of the standard when I get a spare
minute
> (in about 3 years!)

I agree. There are also what appear to me to be errors in the examples given - perhaps because no compiler existed to try this stuff out on before it was standardized. The silence on error handling is another mistake. I also cannot figure out the point the 'static' array index is for (I know what it does, just not the why.)

> It's good that you're allocating from the stack. Is that itself (as
opposed
> to getting from the heap) part of the standard? I seem to recall that it should be allocated from the heap, but the memory is vague.

I don't think the standard makes any mention of that. It's supposed to be possible to implement standard C on a stackless architecture.


« First   ‹ Prev
1 2