comp.lang.ada
 help / color / mirror / Atom feed
From: bill@
Subject: Re: locating exceptions (Ada vs. Java)
Date: 1999/03/20
Date: 1999-03-20T00:00:00+00:00	[thread overview]
Message-ID: <7d0mev$a0r@drn.newsguy.com> (raw)
In-Reply-To: 7cvu1s$14g$2@pegasus.csx.cam.ac.uk

In article <7cvu1s$14g$2@pegasus.csx.cam.ac.uk>, mgk25@cl.cam.ac.uk says...
>
 
>What does Java do in the case of out-of-memory exceptions in small
>embedded systems (e.g., Java smartcard with 256 bytes RAM), where
>there might not be space free for allocating an exception object?

I am not an expert on this subject, but I understand there is a special 
version of the JVM run-time for embedded Java stuff? 

check for example http://java.sun.com/products/javacard/

selected quotes:

"The Java Card specifications enable Java technology to run
 on smart cards and other devices with limited memory."

"Java Card technology preserves many of the benefits of the
 Java programming language - productivity, security,
 robustness, tools, and portability - while enabling Java
 technology for use on smart cards. The Virtual Machine
 (VM), the language definition, and the core packages have
 been made more compact and succinct to bring Java
 technology to the resource - constrained environment of smart cards."

"The Java Card Application Environment can run in devices
 with memory as small as 24K of ROM, 16K of EEPROM, and
 512 bytes of RAM."

Also check : http://java.sun.com/products/personaljava/

"
             technology-enabled micro web browser
             for consumer devices, part of its Personal
             Applications product suite."


There seem to be all sort of Java stuff running on small devices, Java 
in wireless devices, etc.. So, I assume these things do work?

Second, the way JVM works is that it pre-allocate memory for its 
heap usage at the start. so, when doing new() something, memory 
is always allocated from that reserved memory.  the JVM does not go 
to the OS everytime it needs to allocate memory.  (i.e. malloc(), free()
works against this pre-allocated memory).

So, I guess for embedded stuff, the JVM will allocate whatever memory on
the board, or the device, there is or as configured and re-use only that. 

>Ada's exception mechanism sounds to me less comfortable, but more
>foolproof here, as it does not rely on an operational heap. 

Well, I don't see the difference between pre-allocating some large
amount of memory for use by the JVM as the heap and working within
that limit throught the running of the program, and between pre-allocating
some large amount of static memory. Heap and stack and static memory, are
all the same thing, it is just memory !

Again, I am not an expert on this, but I just wanted to say that Java
is allready being used in small devices (based on what I read, I 
have no personal expierence with this) , so I assume it works fine even
on small devices!

Bill.





  reply	other threads:[~1999-03-20  0:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-14  0:00 A small Ada success story Steffen Huber
1999-03-17  0:00 ` Nick Roberts
1999-03-17  0:00 ` Tom Moran
1999-03-17  0:00   ` dennison
1999-03-18  0:00     ` Corey Ashford
1999-03-18  0:00       ` bill
1999-03-19  0:00         ` Larry Kilgallen
1999-03-19  0:00         ` Fraser Wilson
1999-03-21  0:00           ` Ehud Lamm
1999-03-21  0:00             ` robert_dewar
1999-03-21  0:00               ` Tom Moran
1999-03-21  0:00                 ` robert_dewar
1999-03-22  0:00               ` Simon Wright
1999-03-20  0:00         ` locating exceptions (Ada vs. Java) Markus Kuhn
1999-03-20  0:00           ` bill [this message]
1999-03-19  0:00       ` A small Ada success story dewar
1999-03-18  0:00     ` locating exceptions (was: Ada success story) Markus Kuhn
1999-03-19  0:00     ` A small Ada success story Michael F Brenner
1999-03-26  0:00       ` Steve Quinlan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox