Re: GNAT GPL for Mac OSX stack checking problem



The compiler and GPS seem to work, it is the generated test driver
that I'm having problems with.

I saw 10.3 referenced when I downloaded it, but I have a history with
the Linux versions where you can, at times, run the compiler on a
different version than they built on. For instance, the versions
build for Redhat 7.1 could run on 7.2, 7.3, 8, EL 2.1, but GLIBC
differences essentially required a new version from Adacore for RH9,
EL3, etc. (The change to the new threading library).

I just took a look at the ulimit command. I would have to look at the
documentation to increase it under macos, but traditionally, the stack
you are changing with this command is the Environment stack, which is
the stack for the actual main procedure, NOT the tasks for individual
tasks. If GNAT, on the Mac, is putting all the tasks I declared in
the procedure declare section into the environment stack, that is
different behavior than any other Ada compiler I've used, since the
Linux GNAT uses the heap, Rational Apex uses the heap, the VADs Ada83
compiler used the heap, and Alsys on Unix used the heap.

Essentially, my test procedure was

procedure test_tasks is

task type task_type is
pragma storage_size(10000000);

entry start;
end;

task body test_tasks is

begin

accept start;

loop
putline("task num");
delay 10.0;
stack_user;
end loop;
end;

procedure stack_user is
buffer:string(1..2048);

begin
buffer(1):=' ';
stack_user;
exception
when storage_error=> text_io.put_line("Storage_Error");
end;

the_tasks : array(1..10) of task_type;

begin

--Call Start on all tasks

end;


The above test driver would not have run on older Linux releases using
LinuxThreads since the glibc limited task stack sizes to 2Meg. So, in
those versions of Linux, we used the FSU threads which could be
larger. I just wanted to see if MacOS had a similar limitation.

On Fri, 7 Oct 2005 02:48:22 UTC, "John B. Matthews"
<nospam@xxxxxxxxxx> wrote:

> In article <KIRoJuEXw9g9-pn2-JDKN54ZBmMfZ@ecs>,
> "Kevin K" <kevink4@xxxxxxxxx> wrote:
>
> > I've downloaded the new 2005 GPL edition for the Mac
> > [...]
> > I guess the question is what is the maximum stack size of a task under
> > OSX? (10.4 with all available patches)
> > [...]
>
> You can examine & modify the stack limit using the bash shell's built-in
> ulimit command:
>
> $ ulimit -s
> 8192
>
> Looks like eight megabytes.
>
> I see that GNAT GPL 2005 Edition specifies Mac OS X Server 10.3. Does it
> work under 10.4? Non-server?
>


--

.



Relevant Pages

  • Re: Is MSDN wrong? or I made a mistake? about static member function
    ... the heap" or some such reference. ... shouldn't we have a uniform notation? ... You can tell a heap object from a stack object by ... the result of trying to build a compiler on a tiny computer by someone who wasn't a very ...
    (microsoft.public.vc.mfc)
  • Re: Value Types and Reference Types
    ... There is a stack and a heap. ... The compiler basically has a list of types that are ... If you do int x and then object y = x. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: GNAT GPL for Mac OSX stack checking problem
    ... >> The compiler and GPS seem to work, it is the generated test driver ... >> documentation to increase it under macos, but traditionally, the stack ... >> Linux GNAT uses the heap, Rational Apex uses the heap, the VADs Ada83 ...
    (comp.lang.ada)
  • Re: Off Topic: Stack vs. Heap
    ... >> If heap or stack implementation is not part of the standard, ... > It depends upon your compiler. ... Kevin Grigorenko ...
    (comp.lang.cpp)
  • Re: Do buffers always start with the lowest memory address being the first element?
    ... > The C standard does not assume a downward-growing stack, ... > an upward-growing stack. ... C allows but does not require that the array produced ... > machine depends on both the C compiler and the machine. ...
    (comp.lang.c)