[2897] in java-interest

home help back first fref pref prev next nref lref last post

Storage

daemon@ATHENA.MIT.EDU (Michael St. Hippolyte)
Thu Oct 19 17:09:14 1995

Date: Thu, 19 Oct 1995 14:53:54 -0400
To: java-interest@java.sun.com
From: mash@interport.net (Michael St. Hippolyte)

I have a question concerning how Java deals with byte-aligned data.
If allocate an array of 1000 of the following object...

	public class MidiMessage {
		public byte status;
		public byte data1;
		public byte data2;
	}

...will I be allocating 3000, 4000, or (God forbid) 12000 bytes of machine
memory?  Am I better off packing the bytes myself into an int?  Any guidance
would be appreciated.  Thanks!

....................................
 \      Michael St. Hippolyte       `.
  \        mash@interport.net         `.
   \   http://www.interport.net/~mash   `.
    ```````````````````````````````````````


-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post