01: /*
02: *
03: *
04: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
05: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License version
09: * 2 only, as published by the Free Software Foundation.
10: *
11: * This program is distributed in the hope that it will be useful, but
12: * WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * General Public License version 2 for more details (a copy is
15: * included at /legal/license.txt).
16: *
17: * You should have received a copy of the GNU General Public License
18: * version 2 along with this work; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA
21: *
22: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23: * Clara, CA 95054 or visit www.sun.com if you need additional
24: * information or have any questions.
25: */
26:
27: package com.sun.midp.main;
28:
29: /**
30: * Structure containing the run time information about the midlet.
31: */
32: class RuntimeInfo {
33: /**
34: * The minimum amount of memory guaranteed to be available to the isolate
35: * at any time. Used to pass a parameter to midlet_create_start(),
36: * < 0 if not used.
37: */
38: int memoryReserved;
39:
40: /**
41: * The total amount of memory that the isolate can reserve.
42: * Used to pass a parameter to midlet_create_start(), < 0 if not used.
43: */
44: int memoryTotal;
45:
46: /**
47: * The approximate amount of object heap memory currently
48: * used by the isolate.
49: */
50: int usedMemory;
51:
52: /**
53: * Priority of the isolate (< 0 if not set).
54: */
55: int priority;
56:
57: /**
58: * Name of the VM profile that should be used for the new isolate.
59: * Used (1) to pass a parameter to midlet_create_start();
60: * (2) to get a profile's name of the given isolate in run time.
61: */
62: String profileName;
63:
64: /** Constructor */
65: RuntimeInfo() {
66: }
67:
68: /**
69: * Returns the string form of this object.
70: *
71: * @return displayable string representation of this object
72: */
73: public String toString() {
74: return "Runtime Information:" + "\n memoryReserved: "
75: + memoryReserved + "\n memoryTotal: " + memoryTotal
76: + "\n usedMemory: " + usedMemory + "\n priority: "
77: + priority + "\n profileName: " + profileName;
78: }
79: }
|