×

System and method for monitoring memory stack size

  • US 9,128,630 B2
  • Filed: 11/25/2013
  • Issued: 09/08/2015
  • Est. Priority Date: 05/30/2013
  • Status: Active Grant
First Claim
Patent Images

1. A method for monitoring a memory stack size, the method comprising:

  • initializing, by a controller, all stack regions of a memory stack;

    dividing, by the controller, all the stack regions of the memory stack into n blocks;

    checking, by the controller, a block sampling first section that is sampled among the stack regions of each block, using a first pointer and a second pointer that each designate memory address positions in order to determine whether the memory stack is used from a first block to an n-th block among the n blocks;

    determining, by the controller, whether a usage trace is present in the block sampling section;

    in response to determining that a usage trace is present in the block sampling first section from the first block to the last, n-th block, determining, by the controller, that a stack overflow phenomenon is able to occur and if so, executing fail-safe logic; and

    in response to determining that no usage trace is present in one among first through last, (n−

    1)-th blocks, measuring a size of the memory stack.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×