Thread stack processing method and device, equipment, medium and program product

The invention relates to a thread stack processing method and device, equipment, a medium and a program product. The method comprises the steps that in the running process of a target thread, running memory needed by the target thread for executing a next program module of a current program module i...

Full description

Saved in:
Bibliographic Details
Main Authors HUI RUNHAI, JI MIN, WANG GUANGHUI, LI XIWU, GUO ZHAOBIN
Format Patent
LanguageChinese
English
Published 29.08.2023
Subjects
Online AccessGet full text

Cover

Loading…
More Information
Summary:The invention relates to a thread stack processing method and device, equipment, a medium and a program product. The method comprises the steps that in the running process of a target thread, running memory needed by the target thread for executing a next program module of a current program module is monitored, and then based on the running memory, the target thread is controlled to be switched between a main stack space and a standby stack space so as to execute the next program module of the current program module. Wherein the standby stack space is a stack space pre-configured according to the maximum running memory required by the target thread execution program. By adopting the method, the stack space resource waste can be avoided while the normal operation of the thread is ensured. 本申请涉及一种线程栈处理方法、装置、设备、介质和程序产品。该方法包括:在目标线程运行的过程中,监测目标线程执行当前程序模块的下一程序模块所需的运行内存,然后基于运行内存,控制目标线程在主用栈空间与备用栈空间之间进行切换,以执行当前程序模块的下一程序模块。其中,备用栈空间为根据目标线程执行程序所需的最大运行内存预先配置的栈空间。采用本方法能够在保证线程正常运行的同时,避免栈空间资源浪费。
Bibliography:Application Number: CN202310637939