US 12,147,337 B2
Memory usage monitoring and improvement in a garbage-collected programming environment
Martin Presler-Marshall, Raleigh, NC (US)
Assigned to Salesforce, Inc., San Francisco, CA (US)
Filed by Salesforce, Inc., San Francisco, CA (US)
Filed on Jan. 25, 2023, as Appl. No. 18/159,257.
Prior Publication US 2024/0248841 A1, Jul. 25, 2024
Int. Cl. G06F 12/02 (2006.01)
CPC G06F 12/0253 (2013.01) [G06F 2212/1016 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method comprising:
identifying via a processor a plurality of garbage collection roots for an application based on a garbage collector implemented in a programming environment, the application being allocated memory within the programming environment, a respective garbage collection root corresponding with an object stored in the allocated memory and having a respective object class definition within a class definition hierarchy;
determining via a graph dominator a designated plurality of retained memory values corresponding with the garbage collection roots, a respective retained memory value indicating a respective amount of the allocated memory employed by a respective garbage collection root;
determining a designated plurality of application classes and associated class memory values, a respective application class including a respective one or more of the garbage collection roots associated with respective object class definitions positioned within a respective portion of the class definition hierarchy corresponding with the respective application class, a respective class memory value aggregating the designated plurality of retained memory values corresponding with the respective one or more garbage collection roots included within the associated application class; and
transmitting via a communication interface a message identifying a source of a change in memory usage for the application between application versions based on the designated plurality of application classes and associated class memory values.