Preliminary Java/JN Size Information

This document describes the current sizes of the UCSC JN system, including the size of the Java Virtual Machine (the JVM). We are still using an older version of the JVM based on JDK 1.0.1.

Size information is given for 2 systems. One system is the system that we actually use daily for development. Although we always are `going to get around' to really looking at sizes in this system, in practice this system tends to grow, since debug and test harness code is routinely added, and we have no fixed memory budget.

The other system is the stripped system. The sizes given for this system do not include the debug/development modules.

In the following, Text space consists of machine code (program instructions). Data is uninitialized space, such as buffers. The Constant space consists of initialized space, such as output format and message strings.

The Bottom Line
Component Normal Development `Stripped' (Dynamic) System (static) System (static) Java (the JVM, 1.0.1) | 183K | 183K | + 1-1.5M heap + classes. JN (the UCSC kernel) | 123K | 40K | + thread stacksizes. TCP/IP (KA9Q subset) | 95K | 87K | + TCP/IP buffers. CLI | 2K | Nat Semi (init/test) | 19K | Camera | 7K |
| 429K | 310K + Dynamic Requirements


DEVELOPMENT/DEBUG SYSTEM

This is the system that we use for daily development. It includes all test programs, structure dumpers, interactive C CLI, test harness, all hardware tests, and the event log.

DEVELOPMENT/DEBUG SYSTEM
Section Text Data Const Total Java (the JVM) | 141586. 31838. 10370. | 183794. CLI | 1664. 53. 703. | 2420. Nat Semi init | 16199. 406. 2512. | 19117. JN | 84000. 11183. 28030. | 123213. KA9Q (TCP/IP) | 80975. 8793. 5854. | 95622. Camera | 5731. 44. 1328. | 7103.
330,155. 52,317. 48,797. 431,269.


STRIPPED SYSTEM

This system does not include debug or development support files. This would be a first stab at a system that was only used for running embedded applications, not for application development.

STRIPPED SYSTEM
Section Text Data Const Total Java (the JVM) | 141586. 31838. 10370. | 183,794. JN | 33185. 2648. 4962. | 40,795. KA9Q (TCP/IP) | 74783. 8531. 4506. | 87,820.
249,554. 43,017. 19,838. 312,409.

This system does not include the camera application, and does not include either the Java CLI native methods or the C CLI. It also does not include the crash dump routines, the debug event log, or National's hardware test routines. The `static footprint' of JN itself is currently around 40K.

Files removed from JN are jn_cli.obj, net_cli.obj, jdmp.obj, jn_log.obj, and t_chain.obj.

Files removed from KA9Q are ipdump.obj, icmpdump.obj, udpdump.obj, ripdump.obj, enetdump.obj, arpdump.obj, tcpdump.obj, net_test.obj, and i_chain.obj.

JN can be configured to some extent via #defines in file jn_gen.h. The following are some of the more important values in the above system:

MAX_NUM_THEADS 16 MAX_NUM_WORK_BLKS 20 MAX_NUM_MBLKS 4096 MAX_JN_FILES 120

JN currently uses simple allocation routines. MAX_NUM_THREADS defines the maximum number of threads that can exist, MAX_NUM_WORK_BLKS defines the maximum number of concurrent activites that the nanokernel can handle, and MAX_NUM_MBLKS defines the maximum number of elements that can be dynamically allocated. MAX_JN_FILES indicates the maximum number of files that can be in use at a given time.


Dynamic Space Requirements

The above only documents the `static' memory requirements. Other memory is allocated dynamically. For the system to start, stacks must be allocated for the null task and the startup task. In the development system, we use 16K for the null task's stack (in principle we could avoid this, but it is sometimes helpful to use the null task for debugging) and 64K to 300K for the startup task's stack. Currently, the startup task `becomes' the java interpreter after all other initialization is complete.

In addition, when Java starts, it allocates space for its heap, handles, mark bits, and monitor cache. The heap usually dominates this space. We usually use either 1Mbyte or 1.5Mbyte. Application usage dictates the required heap space (full size camera images, for instance, are 300K apiece).

Finally, Java classes that are needed are loaded into JN managed memory, not the heap. Thus the size of all needed class files must be included in size footprint calculations.


Raw Object File Sizes

The Text, Data, and Constant size of every object file in all system components is listed in this section.

Text space consists of machine code (program instructions). Data is uninitialized space, such as buffers. The Constant space consists of initialized space, such as output format and message strings.

The components of the system are:

JVM Files
async.obj Text= 506. Data= 75. Const= 0. globals.obj Text= 58. Data= 76. Const= 0. check_cl.obj Text= 2432. Data= 523. Const= 50. interpre.obj Text= 43659. Data= 3196. Const= 2315. profiler.obj Text= 702. Data= 12. Const= 170. check_co.obj Text= 17159. Data= 7109. Const= 122. interrup.obj Text= 381. Data= 0. Const= 0. properti.obj Text= 1703. Data= 1157. Const= 266. class.obj Text= 1959. Data= 533. Const= 137. runtime.obj Text= 545. Data= 79. Const= 0. classini.obj Text= 2450. Data= 235. Const= 57. io.obj Text= 3458. Data= 1896. Const= 0. classloa.obj Text= 8082. Data= 912. Const= 327. security.obj Text= 555. Data= 27. Const= 0. classres.obj Text= 3282. Data= 407. Const= 220. classrun.obj Text= 3809. Data= 278. Const= 310. string.obj Text= 664. Data= 91. Const= 0. classstu.obj Text= 4886. Data= 0. Const= 0. javai.obj Text= 2931. Data= 215. Const= 1754. linker_m.obj Text= 3672. Data= 6714. Const= 92. system.obj Text= 1075. Data= 138. Const= 438. common_e.obj Text= 34. Data= 27. Const= 0. machgc_n.obj Text= 24. Data= 0. Const= 0. system_m.obj Text= 698. Data= 12. Const= 37. compiler.obj Text= 472. Data= 443. Const= 0. math.obj Text= 1030. Data= 172. Const= 3. thread.obj Text= 1009. Data= 243. Const= 19. math_md.obj Text= 131. Data= 0. Const= 0. threadru.obj Text= 730. Data= 269. Const= 0. date.obj Text= 1048. Data= 340. Const= 30. memory_m.obj Text= 357. Data= 19. Const= 215. threads.obj Text= 665. Data= 30. Const= 0. debug.obj Text= 881. Data= 21. Const= 230. monitor.obj Text= 1153. Data= 347. Const= 0. exceptio.obj Text= 666. Data= 14. Const= 19. monitor_.obj Text= 1309. Data= 180. Const= 41. utf.obj Text= 858. Data= 0. Const= 0. exceptis.obj Text= 467. Data= 148. Const= 34. util.obj Text= 4398. Data= 53. Const= 46. filesyst.obj Text= 1553. Data= 351. Const= 0. object.obj Text= 1245. Data= 179. Const= 0. zip.obj Text= 2662. Data= 17. Const= 739. finalize.obj Text= 642. Data= 95. Const= 0. opcodes.obj Text= 0. Data= 3427. Const= 0. gc.obj Text= 15325. Data= 1748. Const= 2699. path_md.obj Text= 261. Data= 30. Const= 0.
JVM Total: Text=141,586. Data=31,838. Const=10,370.

CLI Files
CLI.obj Text= 33. Data= 0. Const= 0. CLIImp.obj Text= 287. Data= 31. Const= 22. CLIutil.obj Text= 415. Data= 22. Const= 0. CLIMain.obj Text= 38. Data= 0. Const= 0. Toggle.obj Text= 261. Data= 0. Const= 0. TogImp.obj Text= 630. Data= 0. Const= 681.
CLI Total: Text= 1,664. Data= 53. Const= 703.

Nat Semi initialization and test Files
ns_main.obj Text= 1597. Data= 0. Const= 1262. dmatest.obj Text= 470. Data= 0. Const= 247. rtctest.obj Text= 522. Data= 0. Const= 204. dramtest.obj Text= 166. Data= 0. Const= 129. biu.obj Text= 408. Data= 0. Const= 0. dram.obj Text= 904. Data= 0. Const= 0. rtc.obj Text= 974. Data= 0. Const= 0. pic.obj Text= 1385. Data= 0. Const= 0. pit.obj Text= 1715. Data= 0. Const= 0. dma.obj Text= 1835. Data= 0. Const= 86. pittest.obj Text= 88. Data= 0. Const= 69. wdtest.obj Text= 352. Data= 0. Const= 307. wd.obj Text= 284. Data= 0. Const= 0. uart.obj Text= 4711. Data= 406. Const= 208. ica.obj Text= 204. Data= 0. Const= 0. pcmcia.obj Text= 584. Data= 0. Const= 0.
Nat Semi Init/test Total: Text=16,199. Data= 406. Const= 2,512.

JN Files
jn.obj Text= 5672. Data= 515. Const= 415. jn_vecs.obj Text= 1129. Data= 206. Const= 460. jn_ns486.obj Text= 66. Data= 0. Const= 0. jn_asm.obj Text= 524. Data= 4. Const= 0. jn_cli.obj Text= 8879. Data= 580. Const= 2720. net_cli.obj Text= 12525. Data= 560. Const= 3271. js_atlan.obj Text= 5759. Data= 84. Const= 1106. js_vt100.obj Text= 330. Data= 0. Const= 45. js_ramfi.obj Text= 0. Data= 0. Const= 0. js_clock.obj Text= 1573. Data= 173. Const= 18. js_rtc.obj Text= 421. Data= 9. Const= 28. js_pcmci.obj Text= 1439. Data= 44. Const= 453. jn_kludge.obj Text= 2405. Data= 433. Const= 542. e_thread.obj Text= 3121. Data= 472. Const= 580. e_sema.obj Text= 1993. Data= 330. Const= 161. e_file.obj Text= 6819. Data= 302. Const= 475. e_signal.obj Text= 430. Data= 0. Const= 222. e_java.obj Text= 389. Data= 0. Const= 401. jn_cdmp.obj Text= 397. Data= 0. Const= 30. jdmp.obj Text= 3403. Data= 119. Const= 2704. jn_log.obj Text= 1552. Data= 4194. Const= 207. uckeybd.obj Text= 74. Data= 0. Const= 0. keybdimp.obj Text= 43. Data= 0. Const= 0. t_chain.obj Text= 24456. Data= 3082. Const= 14166. jv_post.obj Text= 601. Data= 76. Const= 26.
JN Total: Text=84,000. Data=11,183. Const=28,030.

KA9Q Files
ip.obj Text= 3230. Data= 474. Const= 0. iphdr.obj Text= 1397. Data= 0. Const= 0. iproute.obj Text= 4334. Data= 86. Const= 53. mbuf.obj Text= 2530. Data= 58. Const= 193. ipdump.obj Text= 621. Data= 0. Const= 134. iface.obj Text= 3434. Data= 664. Const= 603. timer.obj Text= 829. Data= 21. Const= 46. misc.obj Text= 1018. Data= 5. Const= 3. icmpmsg.obj Text= 0. Data= 762. Const= 0. icmpdump.obj Text= 729. Data= 0. Const= 114. icmp.obj Text= 1803. Data= 684. Const= 85. icmphdr.obj Text= 707. Data= 0. Const= 0. config.obj Text= 152. Data= 1004. Const= 40. ipsock.obj Text= 771. Data= 40. Const= 0. udpsock.obj Text= 766. Data= 36. Const= 32. udpdump.obj Text= 302. Data= 0. Const= 62. rip.obj Text= 4154. Data= 20. Const= 354. ripdump.obj Text= 416. Data= 0. Const= 74. ping.obj Text= 1319. Data= 31. Const= 179. arp.obj Text= 2121. Data= 0. Const= 0. arphdr.obj Text= 563. Data= 0. Const= 0. arpcmd.obj Text= 668. Data= 0. Const= 226. udp.obj Text= 1254. Data= 104. Const= 0. sockutil.obj Text= 368. Data= 0. Const= 23. sockcmd.obj Text= 393. Data= 1. Const= 131. sockuser.obj Text= 729. Data= 55. Const= 98. locsock.obj Text= 1246. Data= 89. Const= 41. enet.obj Text= 804. Data= 6. Const= 110. enetdump.obj Text= 272. Data= 0. Const= 76. arpdump.obj Text= 547. Data= 0. Const= 187. tcpsock.obj Text= 2495. Data= 132. Const= 64. tcpsubr.obj Text= 1381. Data= 567. Const= 17. tcpin.obj Text= 5225. Data= 0. Const= 0. tcpout.obj Text= 975. Data= 0. Const= 0. tcptimer.obj Text= 171. Data= 0. Const= 0. tcphdr.obj Text= 1356. Data= 0. Const= 0. tcpuser.obj Text= 1902. Data= 17. Const= 0. tcpdump.obj Text= 612. Data= 55. Const= 138. socket.obj Text= 3396. Data= 492. Const= 199. udp.obj Text= 1628. Data= 104. Const= 0. udphdr.obj Text= 466. Data= 4. Const= 18. domain.obj Text= 6374. Data= 216. Const= 437. domhdr.obj Text= 2059. Data= 0. Const= 0. inetmain.obj Text= 3066. Data= 680. Const= 394. ikludge.obj Text= 4129. Data= 141. Const= 1051. atlantic.obj Text= 348. Data= 96. Const= 0. net_test.obj Text= 2031. Data= 138. Const= 275. datasock.obj Text= 218. Data= 0. Const= 0. inetaddr.obj Text= 219. Data= 0. Const= 0. socinpst.obj Text= 51. Data= 0. Const= 0. socoutst.obj Text= 47. Data= 0. Const= 0. plasocim.obj Text= 274. Data= 0. Const= 0. jasock.obj Text= 4413. Data= 1940. Const= 109. i_chain.obj Text= 662. Data= 71. Const= 288.
KA9Q Total: Text=80,975. Data=8,793. Const= 5,854.

Camera Files
parallel.obj Text= 552. Data= 0. Const= 0. quickcam.obj Text= 131. Data= 0. Const= 0. jn_qcam.obj Text= 3083. Data= 44. Const= 1086. qcimp.obj Text= 1662. Data= 0. Const= 242. qcsocket.obj Text= 51. Data= 0. Const= 0. qcparam.obj Text= 77. Data= 0. Const= 0. qctest.obj Text= 48. Data= 0. Const= 0. thcamera.obj Text= 127. Data= 0. Const= 0.
Camera Total: Text= 5,731. Data= 44. Const= 1,328.