bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] More Solaris porting issues


From: Elias Mårtenson
Subject: Re: [Bug-apl] More Solaris porting issues
Date: Sat, 5 Apr 2014 21:28:55 +0800

I read that description too, but they never clarify what those problems may be. The only thing I can think of is the risk of blowing the stack if the block is too large, but that is not different from using dynamically allocated arrays in C like you used to.

Regards,
Elias


On 5 April 2014 21:26, Juergen Sauermann <address@hidden> wrote:
Hi,

I hope the Solaris issues are fixed now (SVN 187). Please complain if not.

I decided against alloca() because the description on its man page
suggested more problems than advantages.

/// Jürgen



On 04/03/2014 02:55 PM, Elias Mårtenson wrote:

It would, but OpenMP is not supported on it. Also, the Solaris Studio compiler tends to generate better code.

Also, alloca() (as opposed to malloc()  which allocates memory on the heap) behaves exactly the same as dynamically advocated arrays. They both allocate space on the stack. In fact, I believe GCC generates exactly the same code for both cases. They both essentially translates to an add instruction of the stack pointer.

Regards,
Elias

On 3 Apr 2014 20:33, "Juergen Sauermann" <address@hidden> wrote:
Hi Elias,

I will look into this, but some have performance impacts (dynamic arrays).
Wouldn't it make sense to install gcc on Solaris?

/// Jürgen


On 04/02/2014 12:46 PM, Elias Mårtenson wrote:
Also, if you want to try out the Solaris compiler, it's available for free for Linux as well: http://www.oracle.com/technetwork/server-storage/solarisstudio/beta-1947596.html

To enable OpenMP you need to compile with -xopenmp=parallel and set some environment variables as described here: http://docs.oracle.com/cd/E18659_01/html/821-1381/aewcb.html#gkcrd

Regards,
Elias


On 2 April 2014 18:39, Elias Mårtenson <address@hidden> wrote:
Oh, and there are a few more dynamically sized arrays:
  • phrase_gen.cc:115 and 222
Regards,
Elias


On 2 April 2014 18:34, Elias Mårtenson <address@hidden> wrote:
On 2 April 2014 18:32, Elias Mårtenson <address@hidden> wrote:

Declaring an array with a size computed at runtime is not actually allowed (it's supported in modern C, and also supported in C++ as an extension).

What I meant was that it's supported in GCC as an extension, not C++.

Regards,
Elias






reply via email to

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