help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GCC 3.3.4 setting Stack and Heap


From: Roger Leigh
Subject: Re: GCC 3.3.4 setting Stack and Heap
Date: Fri, 26 Nov 2004 23:37:12 +0000
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dave Dons <address@hidden> writes:

> Help appreciated setting stack (and heap) in GCC Linux:
>
> gcc (GCC) 3.2.3 (mingw special 20030504-1) has no problems with:
> g++ -Wl,--heap,1048576,--stack,10485760
> However,
> gcc (GCC) 3.3.4 (Debian 1:3.3.4-9) in ClusterKnoppix 3.6
>
> g++ -Wl,--stack -Wl,10485760 axx1.cpp utils.cpp -Wall -Os -o axxgcc
> and all the other variations above give similar to:
>
> /usr/bin/ld: unrecognized option '--stack'
> /usr/bin/ld: use the --help option for usage information
> collect2: ld returned 1 exit status
>
> I suspect that this is not an issue specific to Knoppix or Debian.

That's correct.  You don't need to set either; it's specific to
MicroSoft systems.  On GNU/Linux, the stack grows and shrinks as
required, and the "heap" is grown/shrunk using sbrk and/or mmap as
required (using the standard new/malloc routines).


Regards,
Roger

- -- 
Roger Leigh
                Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
                Debian GNU/Linux        http://www.debian.org/
                GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQFBp74mVcFcaSW/uEgRAnRcAKD0DJbErTC/ceP8+L6n6fIaPXht1QCgiTJX
6lG7qX53HkHWN9KSwapozLI=
=LkR0
-----END PGP SIGNATURE-----


reply via email to

[Prev in Thread] Current Thread [Next in Thread]