Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using sizeof for getting jbyteArray size

843829Aug 4 2010 — edited Aug 4 2010
I can't seem to figure out why when I do sizeof(byte_array) I always get 8 in C++, no matter what. When I call env->NewByteArray(size_of_byte_array_in_bits), I pass it let's say 120,000, it creates the byte array and I can call GetByteArrayElements(byte_array, NULL) I can see all my elements inserted, but nevertheless sizeof(byte_array) returns an 8. I'm just trying to create a byte array of 15MB and testing to make sure that it is 15MB but I don't know if this will work.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 1 2010
Added on Aug 4 2010
1 comment
361 views