+ Start a Discussion

Maximum heap size always zero

Never have I seen the maximum heap size in my code go above zero.


Is this because my code is just that efficient or am I doing something wrong? I'm viewing the heap size in the developer console in the cumulative limits.


this link will give you some clarity....hope this helps you


Ok, so that works when you do:



But what is that maximum heap size for under LIMIT_USAGE_FOR_NS? That still remains at 0 at all times.


nope in general that will depends on as per documentation 

Number of SOQL queries

Number of query rows

Number of SOSL queries

Number of DML statements

Number of DML rows

Number of code statements

Maximum heap size

Number of callouts

Number of Email Invocations

Number of fields describes

Number of record type describes

Number of child relationships


Number of picklist describes

Number of future calls

Number of find similar calls

Number of System.runAs() 


I do read the documentation. That didn't help, sorry.


I want to know why it remains at 0. It never increases to tell me the maximum heap size.