[Oberon] Ram & processors

Patrik Reali reali at acm.org
Sat Feb 1 23:31:16 CET 2003


Hi Gerard,

this are the two procedures I use in the JVM to retrieve the memory size and
the free memory.

  PROCEDURE totalMemory*(): LONGINT;
   VAR total, low, high: LONGINT;
  BEGIN
   AosMemory.GetFreeK(total, low, high);
   RETURN 1024 * total
  END totalMemory;

  PROCEDURE freeMemory*(): LONGINT;
   VAR total, low, high, free, largest: LONGINT;
  BEGIN
   AosHeap.GetHeapInfo(total, free, largest);
   AosMemory.GetFreeK(total, low, high);
   RETURN free+1024*(low+high)
  END freeMemory;

-Patrik


----- Original Message -----
From: "Gérard Meunier" <gmeunier at club-internet.fr>
To: <oberon at inf.ethz.ch>
Sent: Friday, January 31, 2003 1:30 AM
Subject: [Oberon] Ram & processors


> Hello,
>
> I need two informations for my programs under BB: the amount of available
> ram and the number of processors.
>
> I think that AosBoot.memTop gives the first answer. Is there a more
portable
> way to get this information?
>
> I don't know where I can get the second answer.
AosProcessors.allProcessors
> seems interesting, but it is not exported. So...
>
> Thanks for clues.
>
> Gérard
>
> --
> Oberon at inf.ethz.ch mailing list for ETH Oberon and related systems
> http://www.lists.inf.ethz.ch/mailman/listinfo/oberon
>




More information about the Oberon mailing list