US 11,782,762 B2
Stack management
Richard Senior, San Diego, CA (US); Sundeep Kushwaha, Round Rock, TX (US); Harsha Gordhan Jagasia, Austin, TX (US); Christopher Ahn, San Diego, CA (US); Gurvinder Singh Chhabra, San Diego, CA (US); Nieyan Geng, San Diego, CA (US); Maksim Krasnyanskiy, San Diego, CA (US); and Unni Prasad, San Diego, CA (US)
Assigned to QUALCOMM Incorporated, San Diego, CA (US)
Filed by QUALCOMM Incorporated, San Diego, CA (US)
Filed on Feb. 26, 2020, as Appl. No. 16/801,776.
Claims priority of provisional application 62/811,403, filed on Feb. 27, 2019.
Prior Publication US 2020/0272520 A1, Aug. 27, 2020
Int. Cl. G06F 9/46 (2006.01); G06F 9/50 (2006.01); G06F 9/48 (2006.01); G06F 12/0806 (2016.01)
CPC G06F 9/5016 (2013.01) [G06F 9/4806 (2013.01); G06F 9/5022 (2013.01); G06F 12/0806 (2013.01); G06F 2209/481 (2013.01); G06F 2209/503 (2013.01); G06F 2212/1021 (2013.01)] 30 Claims
OG exemplary drawing
 
1. A device for stack management comprising:
multiple tiers of stacks, each tier of stacks comprising shared stacks, wherein each tier of stacks of the multiple tiers of stacks includes fewer and larger stacks as compared to a previous tier of stacks of the multiple tiers of stacks;
a first memory configured to include a first count of first stacks that are included in a first stack tier of the multiple tiers of stacks, wherein each of the first stacks is of a first stack size;
a second memory configured to include a second count of second stacks that are included in a second stack tier of the multiple tiers of stacks, wherein each of the second stacks is of a second stack size, wherein the second count is less than the first count, and wherein the second stack size is greater than the first stack size; and
a stack manager of a processor, the stack manager configured to:
detect that a size of a frame to be allocated exceeds available space of a first stack of the first stacks, the first stack used by a particular task executing at the processor;
responsive to determining that the size of the frame to be allocated exceeds the available space of the first stack, select a second stack from one or more unallocated stacks of the second stack tier and designate the second stack for use by the particular task;
copy metadata associated with the first stack to the second stack, the metadata enabling the stack manager to transition from the second stack to the first stack upon detection that the second stack is no longer in use by the particular task; and
allocate the frame in the second stack.