function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
admintrmpadmintrmp 

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.

kiranmutturukiranmutturu

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

admintrmpadmintrmp

Ok, so that works when you do:

System.debug(Limits.getHeapSize());

 

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

kiranmutturukiranmutturu

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

 describes

Number of picklist describes

Number of future calls

Number of find similar calls

Number of System.runAs() 

invocations
admintrmpadmintrmp

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.