You need to sign in to do that
Don't have an account?
mits430x
Estimated heap memory size
Hi all,
Can we estimate how much heap memory Apex may use?
We want to avoid exceeding governor limits as much as possible.
Therefore, we're wondering how to calculate required heap memory before we execute them...
Does anyone have any idea?
To measure the heap size, there are 2 limit methods available in apex:-
- getHeapSize()
- getLimitHeapsize()
Use the first one to measure how much heap size has been used and the second one to know how much can be used. For more information, please refer apex language reference page no. 278.
Regards,
According to those document you pointed, probably the 2 methods are not purpose to forecast heap size, and I could find no info about forecasting it.
It pains me to say it, but did you say there is no ways to forecast without executing Apex?
Thank you.