KR20130060984A - Method for managing stack of memory - Google Patents
Method for managing stack of memory Download PDFInfo
- Publication number
- KR20130060984A KR20130060984A KR1020110127325A KR20110127325A KR20130060984A KR 20130060984 A KR20130060984 A KR 20130060984A KR 1020110127325 A KR1020110127325 A KR 1020110127325A KR 20110127325 A KR20110127325 A KR 20110127325A KR 20130060984 A KR20130060984 A KR 20130060984A
- Authority
- KR
- South Korea
- Prior art keywords
- stack
- overflow
- stack area
- software
- execution
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0875—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with dedicated cache, e.g. instruction or stack
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/06—Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
- G06F12/0646—Configuration or reconfiguration
- G06F12/0684—Configuration or reconfiguration with feedback, e.g. presence or absence of unit detected by addressing, overflow detection
Abstract
Description
본 발명은 메모리의 스택 관리 방법에 관한 것으로, 더욱 상세하게는 소프트웨어의 실행을 위한 시스템으로부터 잦은 인터럽트 요청이 있거나 다수의 네트워크 데이터 수신이 있는 경우에 메모리의 스택 영역에 대한 오버플로우를 감지하고, 오버플로우의 발생으로 인한 시스템 오동작을 방지하기 위한 메모리의 스택 관리 방법에 관한 것이다.The present invention relates to a stack management method of a memory, and more particularly, to detect an overflow to a stack area of a memory in case of frequent interrupt requests or a plurality of network data receptions from a system for executing software. The present invention relates to a stack management method of a memory for preventing a system malfunction due to a flow.
통상적으로, 차량 내 전자제어장치는 각 소프트웨어의 실행을 위해서는 램(RAM)의 저장 공간을 할당하고 해지하는 동작을 수행한다.In general, the electronic control apparatus in the vehicle performs an operation of allocating and releasing storage space of RAM to execute each software.
이러한 동작 수행 중에, 어떠한 신호 또는 명령에 의해 메모리에 일시적으로 소정 데이터를 하여야 하는 경우가 있는데, 이를 위한 일시 기억용을 위해 메모리 상에 스택(Stack) 영역을 설정한다.While performing such an operation, there is a case where predetermined data must be temporarily applied to the memory by a signal or a command, and a stack area is set on the memory for temporary storage.
또한, 스택 영역에 저장되는 스택 사이즈는 사전 계산이 다소 어렵기 때문에, 스택 사이즈는 일정 설정영역 이외에 미사용 영역을 예비적으로 설정하여 놓는 것이 일반적이다. In addition, since the stack size stored in the stack area is somewhat difficult to precalculate, it is common to set the unused area preliminarily in addition to the predetermined setting area.
아울러, 메모리 중에는 상기 설명한 미사용 영역의 다음 영역에 별도의 데이터 영역이 배치되며, 이러한 데이터 영역에는 기 설정된 일정 데이터들이 고정적으로 저장되어 있다.In addition, a separate data area is disposed in the memory next to the unused area as described above, and preset data is fixedly stored in the data area.
이와 같은 스택 영역은 외부로부터의 신호 또는 명령에 따른 동작 수행에 따라 임시적인 데이터 저장공간으로 사용되는데 대부분의 경우, 이미 설정된 스택설정영역을 벗어나지 않으며 벗어나더라도 미사용 영역의 범위를 넘지 않는 것이 일반적이다.Such a stack area is used as a temporary data storage space according to an operation performed by a signal or a command from the outside. In most cases, the stack area does not go beyond the previously set stack setting area and does not exceed the range of the unused area.
하지만, 경우에 따라서는 스택설정영역과 미사용 영역을 넘어서 데이터 영역까지 침범하여 사용하게 되는 상황이 발생하기도 하며, 이 경우 기 설정된 데이터 값이 변경되면서 이후의 프로세싱에서 변경된 데이터 값을 사용하게 됨에 따라 해당 시스템의 오류 또는 오작동을 유발하게 되는 원인이 된다.However, in some cases, there may be situations in which the data area is invaded beyond the stack setting area and the unused area, and in this case, as the preset data value is changed, the changed data value is used in subsequent processing. It may cause system error or malfunction.
따라서, 소프트웨어의 실행을 위한 시스템으로부터 잦은 인터럽트 요청이 있거나 다수의 네트워크 데이터 수신이 있는 경우 등에 의해 스택설정영역이 데이터 영역에까지 확장되는 것을 방지하기 위한 방안이 요구된다.Therefore, there is a need for a method for preventing the stack setting area from extending to the data area due to frequent interrupt requests or a large number of network data receptions from a system for executing software.
따라서, 본 발명은 상기의 문제점을 해결하기 위해 창출된 것으로, 본 발명의 목적은 소프트웨어의 실행을 위한 시스템으로부터 잦은 인터럽트 요청이 있거나 다수의 네트워크 데이터 수신이 있는 경우 메모리의 스택 영역에 대한 오버플로우가 발생할 가능성이 있으므로, 소정의 소프트웨어를 실행하기 전에 메모리의 스택 영역에 대해 특정 패턴으로 미리 설정되어 있는 체크 값의 변동 여부에 따라 메모리의 스택 영역에 대한 오버플로우 발생 여부를 판단한 후 그에 따른 대응을 실행하기 위한 메모리의 스택 관리 방법을 제공하는 데 있다.Accordingly, the present invention has been made to solve the above problem, and an object of the present invention is to overflow the stack area of the memory in case of frequent interrupt requests or a large number of network data reception from the system for executing the software. Since there is a possibility of occurrence, it is determined whether or not the overflow of the stack area of the memory has occurred according to whether or not the check value, which is preset in a specific pattern for the stack area of the memory, is changed before executing the predetermined software. It is to provide a stack management method of memory.
상기 목적을 달성하기 위한 본 발명의 관점에 따른 메모리의 스택 관리 방법은, 전자제어장치에서 저장 공간 내의 스택 영역을 이루는 각 어드레스에 대해 특정 패턴의 체크 값으로 초기화하는 초기화 단계, 소프트웨어의 실행을 통해 상기 스택 영역에 대한 스택 사용량이 증가하는 실행 단계, 상기 스택 영역을 이루는 각 어드레스에 대한 특정 패턴의 체크 값을 토대로 하여 상기 스택 사용량을 측정하는 측정 단계 및 상기 스택 사용량을 포함하는 스택의 오버플로우 판단 기준에 따라 상기 소프트웨어의 실행을 지속하거나 리셋하는 오버플로우 대응 단계를 포함하는 것을 특징으로 한다.A stack management method of a memory according to an aspect of the present invention for achieving the above object, an initialization step of initializing each address forming a stack area in a storage space in the electronic control unit with a check pattern of a specific pattern, through the execution of software An execution step of increasing stack usage for the stack region, a measuring step of measuring the stack usage based on a check value of a specific pattern for each address constituting the stack region, and determining a stack overflow including the stack usage And an overflow response step of continuing or resetting the execution of the software according to the criteria.
바람직하게는, 상기 오버플로우 대응 단계는 상기 스택 사용량의 측정 결과에서 미리 정해진 스택의 오버플로우 한계량 이상이면 상기 소프트웨어의 실행을 리셋하고, 상기 스택 사용량의 측정 결과에서 미리 정해진 스택의 오버플로우 한계량 이상이 아니면 상기 소프트웨어의 실행을 지속하는 것을 특징으로 한다.Preferably, the overflow response step resets the execution of the software if the stack usage is greater than or equal to the overflow threshold of the predetermined stack, and the stack usage is greater than or equal to the stack overflow threshold. Or continue the execution of the software.
바람직하게는, 상기 메모리의 스택 관리 방법은 상기 스택 영역을 이루는 각 어드레스에 대한 특정 패턴의 체크 값 중 상기 스택 영역의 마지막 어드레스에는 다른 특정 패턴의 체크 값을 지정하는 단계를 더 포함하는 것을 특징으로 한다.Preferably, the stack management method of the memory further comprises assigning a check value of another specific pattern to a last address of the stack area among the check values of a specific pattern for each address constituting the stack area. do.
바람직하게는, 상기 오버플로우 대응 단계는 상기 스택 영역의 마지막 어드레스에 지정된 체크 값을 이용하는 경우, 상기 스택 영역의 마지막 어드레스에 저장된 프로세스 값을 읽어들인 후 상기 다른 특정 패턴의 체크 값과 비교하고, 비교 결과 상기 프로세스 값이 상기 체크 값과 동일하면 상기 소프트웨어의 실행을 지속하며, 상기 프로세스 값이 상기 체크 값과 상이하면 상기 소프트웨어의 실행을 리셋하는 것을 특징으로 한다.Preferably, when the overflow corresponding step uses a check value specified in the last address of the stack region, the process value stored in the last address of the stack region is read and compared with the check value of the other specific pattern, and compared. As a result, if the process value is equal to the check value, the execution of the software is continued, and if the process value is different from the check value, the execution of the software is reset.
바람직하게는, 상기 오버플로우 대응 단계는 상기 스택 사용량의 측정 결과 및 상기 스택 영역의 마지막 어드레스에 설정된 체크 값의 변동 여부 중 1 이상을 토대로 상기 스택 영역에서의 오버플로우 발생을 판정하는 것을 특징으로 한다.Preferably, the overflow corresponding step is characterized in that the occurrence of overflow in the stack region is determined based on at least one of a measurement result of the stack usage and whether or not the check value set at the last address of the stack region is changed. .
바람직하게는, 상기 스택 사용량에 대한 측정 및 상기 스택 영역의 마지막 어드레스에 대한 리딩 중 1 이상에 대한 실행은 미리 정해진 주기마다 이루어지는 것을 특징으로 한다.Preferably, the execution of at least one of the measurement of the stack usage and reading of the last address of the stack region is performed at predetermined intervals.
바람직하게는, 상기 전자제어장치는 차량 내 구비되는 것을 특징으로 한다.Preferably, the electronic control device is characterized in that provided in the vehicle.
따라서, 본 발명에서는 소프트웨어의 실행을 위한 시스템으로부터 잦은 인터럽트 요청이 있거나 다수의 네트워크 데이터 수신이 있는 경우 메모리의 스택 영역에 대한 오버플로우가 발생할 가능성이 있으므로, 소정의 소프트웨어를 실행하기 전에 메모리의 스택 영역에 대해 특정 패턴으로 미리 설정되어 있는 체크 값의 변동 여부에 따라 메모리의 스택 영역에 대한 오버플로우 발생 여부를 판단한 후 그에 따른 대응을 실행함으로써, 메모리의 스택 영역에 대한 오버플로우가 발생한다고 하더라도 메모리의 데이터 영역에까지 스택 영역이 확장되는 것을 효율적으로 방지할 수 있는 이점이 있다.Therefore, in the present invention, if there is a frequent interrupt request or a large number of network data reception from the system for executing the software, the overflow of the stack area of the memory may occur. Therefore, the stack area of the memory before executing the predetermined software. By determining whether or not an overflow occurs in the stack area of the memory according to whether or not the check value preset in a specific pattern changes, and then perform the corresponding action, even if an overflow occurs in the stack area of the memory. There is an advantage that the stack area can be effectively prevented from extending to the data area.
도 1은 본 발명에 의한 전자제어장치를 일실시 예로 나타내는 도면, 및
도 2는 본 발명에 의한 전자제어장치의 동작 과정을 일실시 예로 나타내는 도면이다.1 is a view showing an electronic control apparatus according to an embodiment of the present invention, and
2 is a diagram illustrating an operation process of an electronic control apparatus according to an embodiment of the present invention.
이하, 첨부도면들을 참조하여 본 발명에 따른 스택의 오버플로우 방지 방법의 바람직한 실시예를 보다 상세히 설명하면 다음과 같다.Hereinafter, a preferred embodiment of a method for preventing overflow of a stack according to the present invention will be described in detail with reference to the accompanying drawings.
도 1은 본 발명에 의한 전자제어장치(100)를 일실시 예로 나타내는 도면이다. 도 1에 단지 예로써 도시된 바와 같이, 전자제어장치(100)는 데이터를 저장할 때 데이터를 저장하기 위한 저장 공간을 데이터 영역 및 스택 영역으로 구분하고, 구분 가능한 영역 중 특정되는 영역에 해당 데이터를 저장한다.1 is a view showing an
즉, 스택 영역에는 특정 시스템 운용을 위한 데이터를 잠깐 사용하고 삭제할 예정인 데이터가 저장되며, 데이터 영역에는 고정적으로 저장되어 반복 사용되기 위한 데이터가 저장된다.That is, data to be used and deleted for a short time and data for a specific system operation is stored in the stack area, and data for fixed and stored data is repeatedly stored in the data area.
또한, 스택 영역의 데이터 입출력 구조는 알려진 바와 같이 LIFO(Last In First Out) 및 FILO(First In Last Out) 방식으로 이루어진다.In addition, the data input / output structure of the stack region is formed by a Last In First Out (LIFO) and First In Last Out (FILO) scheme as is known.
이와 같은 메모리의 설정 구조로 시스템 운용이 정상적으로 이루어지면, 일시적으로 사용될 데이터의 저장 명령이 있으면 메모리의 스택 영역에 해당 데이터를 LIFO(Last In First Out) 및 FILO(First In Last Out) 방식에 따라 임시 저장한다.When the system operation is normally performed with such a memory configuration structure, if there is a command to store data to be temporarily used, the data is temporarily stored in the stack area of the memory according to the LIFO (Last In First Out) and FILO (First In Last Out) methods. Save it.
하지만, 전자제어장치(100)는 소프트웨어의 실행을 위한 시스템으로부터 잦은 인터럽트 요청이 있거나 다수의 네트워크 데이터 수신이 있는 경우와 같은 특정 상황이 발생하게 되면, 동시 다발적으로 메모리의 스택 영역에 임시 저장하기 위한 데이터가 급증하게 된다.However, the
이러한 경우, 본 발명의 전자제어장치(100)는 임시 저장하기 위한 데이터가 일시적으로 급증할 때 이를 감지하여 메모리의 스택 영역이 데이터 영역으로까지 확장되는 것을 방지하기 위한 프로세스를 실행한다.In this case, the
이를 위해, 전자제어장치(100)는 소정의 소프트웨어를 실행하기 전에 저장 공간 내의 스택 영역을 이루는 모든 어드레스 각각에 특정 패턴의 체크 값으로 이루어진 데이터를 지정하여 저장한다.To this end, the
즉, 도 1에 도시된 스택 영역의 마지막 어드레스에는 'C'를 저장하고, 두번째 어드레스에는 'B'를 저장하며, 첫번째 어드레스에는 'A'를 저장한다.That is, 'C' is stored in the last address of the stack region shown in FIG. 1, 'B' is stored in the second address, and 'A' is stored in the first address.
이후, 소프트웨어의 실행이 이루어지면 임시 저장하기 위한 데이터가 순차적으로 스택 영역에 저장되어 진다.Then, when the software is executed, data for temporary storage are sequentially stored in the stack area.
여기서, 임시 저장하기 위한 데이터가 2개이면 스택 영역의 첫번째 어드레스 및 두번째 어드레스에 해당 데이터가 각각 저장될 것이다.Here, if there are two pieces of data for temporary storage, the corresponding data will be stored at the first address and the second address of the stack area, respectively.
따라서, 전자제어장치(100)는 스택 영역의 각 어드레스에 대한 저장 값의 변경 유무를 판정하여 스택 영역의 어느 순번까지 데이터 저장이 이루어졌는지를 판정할 수 있게 되므로, 판정한 스택 사용량에 따라 실행중인 소프트웨어를 지속할 것인지 아니면 리셋하여 재실행할 것인지를 결정한다.Therefore, the
예컨대, 전자제어장치(100)에서 판정한 스택 사용량이 전체 스택 영역 중에서 90% 정도에 이르면 스택 영역을 초과할 가능성이 존재하므로, 스택에 대한 오버플로우가 발생한 것으로 설정하는 것이 가능하다.For example, when the stack usage determined by the
물론, 상기 언급된 90%는 일례를 든 것에 불과하므로, 해당 시스템의 성능 및 스택 영역의 전체 크기를 감안하여 다른 퍼센트로 설정될 수 있다.Of course, the above-mentioned 90% is merely an example, and may be set to other percentages in consideration of the performance of the system and the total size of the stack area.
한편, 스택 영역의 마지막 어드레스에 저장되는 'C'는 첫번째 어드레스 및 두번째 어드레스에 저장되는 값과는 달리, 다른 패턴의 값으로 저장되는 것이 바람직하다.Meanwhile, unlike the values stored in the first address and the second address, 'C' stored in the last address of the stack region is preferably stored in a different pattern value.
즉, 스택 영역의 마지막 어드레스는 다시 말해 스택 영역의 마지막 어드레스 이후에는 데이터 미사용 영역 및 데이터 영역인 것을 나타내는 것이므로, 스택 영역의 마지막 어드레스에 대한 데이터 변경 자체가 스택 영역의 초과 가능성을 알려주는 것이라 할 수 있다.In other words, since the last address of the stack area is indicative of the data unused area and the data area after the last address of the stack area, the change of data to the last address of the stack area itself indicates the possibility of exceeding the stack area. have.
구체적으로, 스택 영역의 마지막 어드레스에 미리 특정 패턴의 체크 값을 저장해 놓은 후 소프트웨어의 실행 중에 주기적으로 스택 영역의 마지막 어드레스에 대한 값을 리딩하고, 리딩한 값이 미리 저장되어 있는 체크 값이 아닌 경우에는 소프트웨어의 실행으로 인해 데이터 입력된 것으로 판정할 수 있으며, 이로 인해 스택 영역의 오버플로우 가능성이 존재하는 것도 판단할 수 있게 된다.Specifically, when a check value of a specific pattern is stored in advance at the last address of the stack area, and the software periodically reads the value of the last address of the stack area, and the read value is not a previously stored check value. It is possible to determine that data is input due to the execution of the software, which also determines whether there is a possibility of overflow of the stack region.
따라서, 전자제어장치(100)는 스택 영역의 각 어드레스에 대한 데이터 변경을 판정하여 도출되는 스택 사용량의 측정 결과를 이용하여 스택 영역의 오버플로우를 판정하는 방식뿐만 아니라, 스택 영역의 마지막 어드레스에 대한 체크 값 변동 여부를 이용하여 스택 영역의 오버플로우를 판정할 수 있다.Therefore, the
경우에 따라, 스택 사용량의 측정 결과를 이용하는 방식과 스택 영역의 마지막 어드레스에 설정된 체크 값의 변동 여부를 이용한 방식 모두를 이용하여 스택 영역의 오버플로우를 판정하는 것도 구현 가능하다.In some cases, it is also possible to determine the overflow of the stack area using both the method of using the result of measuring the stack usage and the method of using the change of the check value set at the last address of the stack area.
상기 언급된 전자제어장치(100)는 차량 내 구비되는 장치 중 하나인 것이 바람직하다.The above-mentioned
도 2는 본 발명에 의한 전자제어장치(100)의 동작 과정을 일실시 예로 나타내는 도면이다. 도 2에 단지 예로써 도시된 바와 같이, 메모리의 스택 관리 방법은 스택 영역의 특정 어드레스를 가르키는 스택 포인터를 초기화할 뿐만 아니라, 스택 영역에 저장되어 있는 임시 데이터에 대해서도 특정 패턴의 체크 값을 갖도록 하는 초기화를 실행한다(S1 및 S3).2 is a diagram illustrating an operation process of the
이후, 시스템 운용을 위한 특정 소프트웨어를 실행하게 되면 이로 인해 저장하게 될 임시 데이터를 스택 영역에 순차적으로 저장한다(S5).Thereafter, when the specific software for operating the system is executed, temporary data to be stored due to this is sequentially stored in the stack area (S5).
소프트웨어의 실행으로 스택 영역에 대한 데이터 저장을 지속하면서, 스택 영역에 대한 오버플로우를 판정하기 위한 주기가 도래하면 스택 영역에 대한 스택 사용량을 측정하거나 스택 영역의 마지막 어드레스에 대한 데이터 변동이 이루어졌는지 여부를 판정하여 스택 영역에 대한 오버플로우 여부를 판정한다(S9).If the execution of the software continues to store data for the stack area, and a cycle for determining the overflow for the stack area arrives, whether the stack usage for the stack area has been measured or whether data fluctuations have occurred for the last address of the stack area. It is determined whether or not the stack region overflows (S9).
이후, S9 단계에서의 판정 결과에서 스택 영역에 오버플로우가 발생한 것으로 확인되면 실행 중인 소프트웨어를 리셋하여 재실행하는 과정을 거친다(S11 및 S13).Thereafter, if it is determined in the step S9 that the overflow occurs in the stack region, the process of resetting and executing the software is executed (S11 and S13).
하지만, S9 단계에서의 판정 결과에서 스택 영역에 오버플로우가 발생하지 아니하였거나, 오버플로우의 발생 가능성이 적은 경우에는 실행 중인 소프트웨어를 지속하여 실행한다.However, if no overflow occurs in the stack area or the overflow probability is small as a result of the determination in step S9, the running software is continued.
해당 시스템의 구동을 위한 전자제어장치(100)의 실행이 종료되면 상기 언급된 단계들의 실행도 함께 종료된다(S15).When execution of the
상기에서는 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다. It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the present invention as defined by the following claims It can be understood that
또한, 본 발명은 소프트웨어의 실행을 위한 시스템으로부터 잦은 인터럽트 요청이 있거나 다수의 네트워크 데이터 수신이 있는 경우에 메모리의 스택 영역에 대한 오버플로우를 감지하고, 오버플로우의 발생으로 인한 시스템 오동작을 방지하기 위한 것임에 따라, 시판 또는 영업의 가능성이 충분할 뿐만 아니라 현실적으로 명백하게 실시할 수 있는 정도이므로 산업상 이용가능성이 있는 발명이다.In addition, the present invention is to detect the overflow to the stack area of the memory when there is a frequent interrupt request or a large number of network data reception from the system for executing the software, and to prevent system malfunction due to the occurrence of the overflow According to the present invention, it is an invention that is industrially available because the possibility of market or business is not only sufficient but also practically obvious.
100: 전자제어장치100: electronic controller
Claims (6)
소프트웨어의 실행을 통해 상기 스택 영역에 대한 스택 사용량이 증가하는 실행 단계;
상기 스택 영역을 이루는 각 어드레스에 대한 특정 패턴의 체크 값을 토대로 하여 상기 스택 사용량을 측정하는 측정 단계; 및
상기 스택 사용량을 포함하는 스택의 오버플로우 판단 기준에 따라 상기 소프트웨어의 실행을 지속하거나 리셋하는 오버플로우 대응 단계;를 포함하는 것을 특징으로 하는 메모리의 스택 관리 방법.An initialization step of initializing, by the electronic control apparatus, a check value of a specific pattern for each address constituting the stack area in the storage space;
An execution step of increasing stack usage of the stack region through execution of software;
A measuring step of measuring the stack usage based on a check value of a specific pattern for each address forming the stack area; And
And an overflow correspondence step of continuing or resetting the execution of the software according to the overflow determination criteria of the stack including the stack usage amount.
상기 오버플로우 대응 단계는 상기 스택 사용량의 측정 결과에서 미리 정해진 스택의 오버플로우 한계량 이상이면 상기 소프트웨어의 실행을 리셋하고, 상기 스택 사용량의 측정 결과에서 미리 정해진 스택의 오버플로우 한계량 이상이 아니면 상기 소프트웨어의 실행을 지속하는 것을 특징으로 하는 메모리의 스택 관리 방법.The method according to claim 1,
In the overflow countermeasurement step, if the stack usage is greater than or equal to the overflow threshold of the predetermined stack, the execution of the software is reset. A stack management method of memory characterized by continuing execution.
상기 메모리의 스택 관리 방법은, 상기 스택 영역을 이루는 각 어드레스에 대한 특정 패턴의 체크 값 중 상기 스택 영역의 마지막 어드레스에는 다른 특정 패턴의 체크 값을 지정하는 단계;를 더 포함하는 것을 특징으로 하는 메모리의 스택 관리 방법.The method according to claim 1,
The stack management method of the memory may further include assigning a check value of another specific pattern to a last address of the stack area among check values of a specific pattern for each address constituting the stack area. Stack management method.
상기 오버플로우 대응 단계는 상기 스택 영역의 마지막 어드레스에 지정된 체크 값을 이용하는 경우, 상기 스택 영역의 마지막 어드레스에 저장된 프로세스 값을 읽어들인 후 상기 다른 특정 패턴의 체크 값과 비교하고, 비교 결과 상기 프로세스 값이 상기 체크 값과 동일하면 상기 소프트웨어의 실행을 지속하며, 상기 프로세스 값이 상기 체크 값과 상이하면 상기 소프트웨어의 실행을 리셋하는 것을 특징으로 하는 메모리의 스택 관리 방법.The method of claim 3,
In the overflow corresponding step, when the check value specified in the last address of the stack region is used, the process value stored in the last address of the stack region is read and compared with the check value of the other specific pattern, and as a result of the comparison, the process value If the check value is the same, execution of the software is continued, and if the process value is different from the check value, the execution of the software is reset.
상기 오버플로우 대응 단계는 상기 스택 사용량의 측정 결과 및 상기 스택 영역의 마지막 어드레스에 설정된 체크 값의 변동 여부 중 1 이상을 토대로 상기 스택 영역에서의 오버플로우 발생을 판정하는 것을 특징으로 하는 메모리의 스택 관리 방법.The method according to claim 3 or 4,
In the overflow countermeasurement step, the occurrence of overflow in the stack region is determined based on at least one of a result of measuring the stack usage and a change in a check value set at a last address of the stack region. Way.
상기 스택 사용량에 대한 측정 및 상기 스택 영역의 마지막 어드레스에 대한 리딩 중 1 이상에 대한 실행은 미리 정해진 주기마다 이루어지는 것을 특징으로 하는 메모리의 스택 관리 방법.6. The method of claim 5,
And performing at least one of the measurement of the stack usage and reading of the last address of the stack region at predetermined intervals.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020110127325A KR101779118B1 (en) | 2011-11-30 | 2011-11-30 | Method for managing stack of memory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020110127325A KR101779118B1 (en) | 2011-11-30 | 2011-11-30 | Method for managing stack of memory |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20130060984A true KR20130060984A (en) | 2013-06-10 |
KR101779118B1 KR101779118B1 (en) | 2017-09-19 |
Family
ID=48859307
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020110127325A KR101779118B1 (en) | 2011-11-30 | 2011-11-30 | Method for managing stack of memory |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101779118B1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102022213286A1 (en) | 2021-12-09 | 2023-06-15 | Hyundai Autoever Corp. | METHOD OF PROTECTING APPLICATION STACKS |
-
2011
- 2011-11-30 KR KR1020110127325A patent/KR101779118B1/en active IP Right Grant
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102022213286A1 (en) | 2021-12-09 | 2023-06-15 | Hyundai Autoever Corp. | METHOD OF PROTECTING APPLICATION STACKS |
Also Published As
Publication number | Publication date |
---|---|
KR101779118B1 (en) | 2017-09-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR20180097674A (en) | Memory reclaim method and apparatus | |
JP4770602B2 (en) | Electronics | |
US20120246525A1 (en) | Method for initiating a refresh operation in a solid-state nonvolatile memory device | |
US8108862B2 (en) | Out-of-order thread scheduling based on processor idle time thresholds | |
CN104932933A (en) | Spin lock acquisition method and apparatus | |
CN108885570B (en) | Vehicle control device | |
CN110489242B (en) | Distributed data computing method, device, terminal equipment and storage medium | |
CN112214291A (en) | Task scheduling method and device | |
KR20130060984A (en) | Method for managing stack of memory | |
WO2020224218A1 (en) | Hbase-based data writing method, system, device, and readable storage medium | |
CN114461323B (en) | Clamping and processing method and device, electronic equipment and storage medium | |
CN116431358A (en) | Resource access method and device, electronic equipment and storage medium | |
US10540117B2 (en) | Storage system including a plurality of networked storage nodes | |
JP5870043B2 (en) | Start control device, information device, and start control method | |
JP2010140239A (en) | Apparatus and method for shortening interrupt latency | |
KR102418991B1 (en) | Adaptive i/o completion method and computer program for performing the same | |
CN117632454A (en) | Linux operating system resource monitoring method and device, storage medium and electronic equipment | |
CN111124943B (en) | Data processing method, device, equipment and storage medium | |
CN111309475B (en) | Detection task execution method and equipment | |
US10514849B2 (en) | Storage system including a plurality of networked storage nodes | |
JP6729430B2 (en) | Electronic control unit | |
JP6378289B2 (en) | Method and apparatus for determining hot pages in a database | |
JP2008305238A (en) | Measuring instrument | |
US20220156074A1 (en) | Electronic device and multiplexing method of spatial | |
CN113439252A (en) | Terminal control method, terminal control device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |