GNAT OS X list ?



  • 1. Getting current date and time
    It looks like there is no standard package for handling current time and date and operations of these entities. What are the available solutions?
  • 2. Workqueues in Ada
    Hello, Few months ago I wrote about a distributed protocol simulator that I was writing in Ada. I followed an advice to stop using a thread per node and to implement a worker thread pool. With the new architecture things improved a lot, all the overhead of context switching has gone. I defined a unit of work as one iteration of one node (checking if new messages have come, processing messages, sending responses, checking if it's time to run a periodic job, updating statistic). I have a workqueue of above units and a pool of tasks that service nodes. The problem is that my poor implementation of workqueue is a bottleneck. A task takes a unit of work from a queue, processes it and puts it back at the and of the queue. Because the queue is Ada.Containers.Doubly_Linked_Lists there are lots of memory allocations and deallocations - that's a performance problem. I consider making a circular list of nodes with "Next_To_Service" pointer going around as nodes are processed. I'll have to make sure that one node can be served by only one task at the time (probably by marking nodes as being served at the moment). New nodes joining and old leaving the system will be more difficult to implement correctly, I suppose. What can you suggest? I'm probably missing something obvious. Thanks in advance! -- Wiktor Moskwa
  • 3. Unary operator after binary operator: legal or not?
    Here's something confusing I encountered: with Ada.Strings.Unbounded; function Xyz (Left, Right : in Ada.Strings.Unbounded.Unbounded_String) return String is function "+" (Right : in Ada.Strings.Unbounded.Unbounded_String) return String renames Ada.Strings.Unbounded.To_String; begin -- Xyz if +Left <= +Right then return +Left & +Right; -- ^ Error reported here. end if; end Xyz; A compiler reports "missing operand", referencing the space after the "&". Why then does it accept the comparison in the previous line? Both are +Left [binary operator] +Right -- Jeff Carter "Have you gone berserk? Can't you see that that man is a ni?" Blazing Saddles 38

GNAT OS X list ?

Postby Wes Groleau » Sat, 20 Sep 2003 12:51:45 GMT

Couldn't get to the mailing list subscribe page

Wes Groleau
Genealogical Lookups:   http://www.**--****.com/ 

Re: GNAT OS X list ?

Postby jim hopper » Sun, 21 Sep 2003 11:34:25 GMT

Wes Mike Feldman hosts the mailing list for us, i forwared you message
on to him.

best jim

In article < XXXX@XXXXX.COM >, Wes Groleau

Similar Threads:

1.GNAT GPL 2009 for 32-bit Mac OS X

AdaCore's GNAT GPL 2009 is built for the x86_64 architecture only.

Some Apple libraries (particularly Tk) come in 32-bit only.

This new build, on Sourceforge in the GnuAda project, is 32-bit only:

2.New FAQ for Macintosh (OS X) GNAT users

3.ANN: GNAT/GPL Mac OS X: 2007-tiger-ppc

4.GNAT for Mac OS X 10.3?

5.Memory leak in BLAS/LINPACK - GNAT on OS X

There have been a few messages on the GNAT-OSX mailing list about an
apparent memory leak in the Ada.Numerics.Long_Real_Arrays
implementation.   The setup is an OS X box (10.4) with the GNAT 4.3
compiler from the site.  The Ada.Numerics.Long_Real_Arrays
is using the Apple-supplied BLAS and LINPACK libraries under the
hood.  The code snippet below (plagiarized from Jerry's post on the
mailing list) leaks memory (as reported by top).  Note that the same
code but with Long_Complex types does not appear to have this problem.

Has anyone seen this problem on other platforms?  Do other languages
on OS X behave this way?  I'm not sure how to track down the guilty
party here.  Is it Apple's BLAS or LINPACK libraries or something in
the GNAT Long_Real_Arrays multiply method?

with Ada.Numerics.Long_Real_Arrays;
use Ada.Numerics.Long_Real_Arrays;

procedure tst_simple is
  v        : Real_Vector(1 .. 100_000) := (others => 1.23);
  res      : Real_Vector(1 .. 100_000);
  for i in 1..1000 loop
    res := 123.456 * v;
  end loop;
end tst_simple;

6. GNAT GPL 2009 for Mac OS X (Snow Leopard)

7. "Do not use" feature list for GNAT

8. Strange problem with linked list code on windows OS

Return to ada


Who is online

Users browsing this forum: No registered users and 47 guest