This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: Remote protocol tune up...
- To: ac131313 at cygnus dot com (Andrew Cagney)
- Subject: Re: Remote protocol tune up...
- From: Todd Whitesel <toddpw at wrs dot com>
- Date: Thu, 14 Oct 1999 14:59:22 -0700 (PDT)
- Cc: gdb at sourceware dot cygnus dot com (GDB Developers)
> regard to ``(256*1024)'', foke law has it that some hosts do not handle
> alloca()s larger than 64k. If you're going to allow large transfers
> then it will need to avoid alloca().''
Alloca really should not be used for stuff that is going to get arbitrarily
large. Many people have their stacksize limit at 8 megs or so, and some of
the NetBSD ports (arm32, pc532, vax) have their default hard limit set at
8 megs also. (Not sure why they felt it necessary to do this; it may have
been an attempt to avoid something nasty in the VM hardware.)
It has been noted that linking large programs (think mozilla) can cause GNU
ld to alloca() quite a bit, ultimately using more than 8 megs of stack.
<soapbox>
I recall being repulsed by the concept of alloca() when I first heard of it.
It really is a gruesome hack just to avoid leaking memory when you get an
error. But if you have any other kind of cleanup to do, alloca() is no help.
</soapbox>
--
Todd Whitesel
toddpw @ wrs.com