Monthly Archive: May 2017

How to fetch facebook reactions for posts 0

How to fetch facebook reactions for posts

Facebook reactions were introduced by Facebook last year. Prior to that you could only like Facebook posts. But after introductions of reactions, you react to a given post in 6 different ways. Fetching likes...

How much memory does a string consume in Java 0

How much memory does a string consume in Java

Understanding String memory usage To understand the above calculation, we need to start by looking at the fields on a String object. A String contains the following: a char array— thus a separate object—...

How much actual memory does an array consume 0

How much actual memory does an array consume

Memory usage of a single-dimension array A single-dimension array is a single object. As expected, the array has the usual object header. However, this object head is 12 bytes to accommodate a four-byte array...

How much actual memory does an object occupy 0

How much actual memory does an object occupy

Instances of an object on the Java heap don’t just take up memory for their actual fields. Inevitably, they also require some “housekeeping” information, such as recording an object’s class, ID and status flags...