KR100497722B1 - Method for controlling memory data storage area, computer readable medium storing the method thereon, and application program executing device - Google Patents

Method for controlling memory data storage area, computer readable medium storing the method thereon, and application program executing device Download PDF

Info

Publication number
KR100497722B1
KR100497722B1 KR10-2002-0037854A KR20020037854A KR100497722B1 KR 100497722 B1 KR100497722 B1 KR 100497722B1 KR 20020037854 A KR20020037854 A KR 20020037854A KR 100497722 B1 KR100497722 B1 KR 100497722B1
Authority
KR
South Korea
Prior art keywords
heap
address
variable
stored
memory
Prior art date
Application number
KR10-2002-0037854A
Other languages
Korean (ko)
Other versions
KR20040003212A (en
Inventor
지대훈
Original Assignee
주식회사 인터와이즈
정보통신연구진흥원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 인터와이즈, 정보통신연구진흥원 filed Critical 주식회사 인터와이즈
Priority to KR10-2002-0037854A priority Critical patent/KR100497722B1/en
Publication of KR20040003212A publication Critical patent/KR20040003212A/en
Application granted granted Critical
Publication of KR100497722B1 publication Critical patent/KR100497722B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3004Arrangements for executing specific machine instructions to perform operations on memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30181Instruction operation extension or modification
    • G06F9/30189Instruction operation extension or modification according to execution mode, e.g. mode flag
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/34Addressing or accessing the instruction operand or the result ; Formation of operand address; Addressing modes
    • G06F9/355Indexed addressing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

스택의 특정공간에 대응되는 변수가 힙변수인가의 여부가 별도의 데이터로 저장되지 않는 경우에도 보다 빠른 시간 내에 그리고 안정적으로 폐공간인가를 판별할 수 있도록, 힙변수 정의 명령어를 검출하는 경우에 스택의 특정주소에 상기 힙변수에 해당되는 힙변수 주소를 저장하고, 상기 힙변수 주소로부터 산출되는 힙슬롯 포인터 주소의 힙영역에 힙슬롯 주소를 저장하며, 상기 힙슬롯 주소의 메모리에는, 설정된 조건을 만족하는 참조값을 저장한다. When the heap variable definition command is detected so that it is possible to determine whether the variable corresponding to a specific space of the stack is a heap variable in a short time and stably even if it is not stored as separate data. The heap variable address corresponding to the heap variable is stored at a specific address of the heap variable, the heap slot address is stored in a heap area of the heap slot pointer address calculated from the heap variable address, and the set condition is stored in the memory of the heap slot address. Stores a reference value that satisfies

Description

메모리 데이터 저장공간 관리 방법, 그 방법을 기록한 기록매체 및 그 방법을 이용한 응용프로그램 수행장치{METHOD FOR CONTROLLING MEMORY DATA STORAGE AREA, COMPUTER READABLE MEDIUM STORING THE METHOD THEREON, AND APPLICATION PROGRAM EXECUTING DEVICE}METHOD FOR CONTROLLING MEMORY DATA STORAGE AREA, COMPUTER READABLE MEDIUM STORING THE METHOD THEREON, AND APPLICATION PROGRAM EXECUTING DEVICE}

본 발명은 메모리의 데이터 저장공간을 관리하는 방법, 장치 그리고 그 방법을 기록한 기록매체에 관한 것으로, 더욱 상세하게는, 메모리의 데이터 저장공간 중 응용프로그램 기타 메모리의 데이터 저장공간을 접근하는 프로그램에서 사용하고 있지 않은 공간을 회수하여 사용 가능하도록 처리하는 방법, 장치 그리고 그 방법을 기록한 기록매체에 관한 것이다. The present invention relates to a method, an apparatus for managing a data storage space of a memory, and a recording medium recording the method. More particularly, the present invention relates to a program for accessing a data storage space of an application program or a memory of the data storage space of the memory. The present invention relates to a method, an apparatus, and a recording medium recording the method for recovering a space which is not used.

최근에는 컴퓨터를 비롯한 다양한 전자장비들이 실용화되고 있고, 이들에는 설정된 프로그램에 의해 동작하는 마이크로프로세서(이하 "CPU"라 한다)가 탑재된다. 상기 CPU에는, 내장된 프로그램 혹은 그 내장된 프로그램을 이용하는 프로그램의 수행 중에 필요한 데이터의 저장을 위하여, 메모리 반도체(이하 "메모리"라고 한다)와 연결된다. Recently, various electronic devices including computers have been put into practical use, and these are equipped with microprocessors (hereinafter referred to as "CPU") which operate by a set program. The CPU is connected to a memory semiconductor (hereinafter referred to as "memory") for storing data necessary during the execution of an embedded program or a program using the embedded program.

경우에 따라서, 상기 메모리 반도체에는 비단 데이터의 저장뿐만 아니라, 소위 오퍼레이팅 시스템(Operating System; 이하 "OS"라 한다)이라 불리는 상기 CPU 및 메모리의 기능을 활용하기 위한 일련의 명령어 집합이 저장되고, 또한 상기 오퍼레이팅 시스템의 기능(function 혹은 subroutine)을 이용하여 다양한 기능을 수행하는 일련의 명령어 집합(이하 "응용프로그램"이라고 한다)도 저장되기도 한다. In some cases, the memory semiconductor stores not only data but also a set of instructions for utilizing the functions of the CPU and the memory, called an operating system (hereinafter referred to as "OS"), and A set of instructions (hereinafter referred to as an "application") that performs various functions using the functions (functions or subroutines) of the operating system may also be stored.

현재 수행되는 특정한 프로그램의 저장장소가 상기 CPU인가 상기 메모리인가를 불문하고, 그 수행과정에서 대개 상기 메모리의 데이터 저장공간(이하 "메모리 데이터공간"이라 한다)을 접근하게 되는데, 프로그램의 수행 중에 메모리의 데이터공간의 활용도를 높이기 위해서는 현재 수행중인 프로그램이 사용하고 있지 않은 메모리의 데이터공간(이하 "폐공간"(廢空間)(Garbage)이라 한다)을 다른 프로그램에서 사용 가능하도록 메모리를 재할당하는 것이 필요하고, 폐공간 활용을 위해 메모리를 재할당하는 것을 "폐공간회수"(Garbage Collection)라 한다. 상기 메모리 재할당은 통상적으로 폐공간을 OS의 관리 하에 두도록 메모리의 할당을 변경하고 있다. Regardless of whether the CPU or the memory is stored in a particular program currently being executed, the data storage space (hereinafter referred to as "memory data space") of the memory is usually accessed during the execution of the program. In order to increase the utilization of the data space, reallocating the memory so that other programs can use the data space (hereinafter referred to as "Garbage") of the memory that is not in use by the current program. Reallocating memory for use of waste space is called "Garbage Collection". The memory reallocation typically changes the allocation of memory to keep the closed space under management of the OS.

통상적으로 프로그램에서의 메모리에의 접근은 변수를 정의함으로써 이루어지는데, 프로그램에서 정의되는 변수는 메모리의 특정공간(이하 "스택"(Stack)이라 한다)의 주소에 할당된다. Typically, accesses to memory in a program are made by defining variables, which are defined in the address of a specific space (hereinafter referred to as a "stack") of memory.

이러한 변수의 정의 방식은 크게, 상기 정의된 변수의 스택(Stack) 내 할당된 주소에 저장된 값을 직접 호출하는 변수(이하 "스택변수"라 한다)와 상기 정의된 변수의 스택 내 할당된 주소에는 메모리의 특정한 주소데이터가 저장하고 그 저장된 주소데이터에 해당되는 메모리의 데이터공간(이하 "힙"(Heap)이라 한다)에 그 변수의 값이 저장되고 호출되는 변수(이하 "힙변수"라 한다)로 대별된다. The definition of such a variable is largely related to variables that directly call a value stored at an allocated address in the stack of the defined variable (hereinafter referred to as a "stack variable") and an allocated address in the stack of the defined variable. A variable that stores specific address data in memory and stores its value in a data space (hereinafter referred to as "heap") of the memory corresponding to the stored address data (hereinafter referred to as "heap variable") It is roughly divided into.

상기 스택변수의 예로는 정수형, 실수형 기타 다양한 예들이 있고, 상기 힙변수의 예로는 포인터 변수(pointer variable)가 있다. Examples of the stack variables include integers, real numbers, and various other examples. Examples of the heap variables include pointer variables.

이러한 폐공간회수(Garbage Collection)를 위해서는, 메모리의 데이터공간 내의 특정한 주소(address)가 폐공간(Garbage)인가를 판단(이하 "폐공간판별" (Garbage Detection)이라 한다)해야 하고, 폐공간으로 판단된 경우에는 다른 프로그램에서 그 특정한 주소를 사용할 수 있도록 메모리를 재할당(이하, "폐공간복구" (Garbage Reclamation)라 한다)해야 한다. For such garbage collection, it is necessary to determine whether a specific address in the data space of the memory is garbage (hereinafter referred to as "Garbage Detection"), and then to the lung space. If so, the memory must be reallocated ("Garbage Reclamation") so that other programs can use that particular address.

이러한 폐공간회수의 문제는 주로 상기 힙(Heap)에 관련된다. This problem of waste space recovery is mainly related to the heap.

도 1은 통상적인 폐공간판별 방법을 설명하기 위한 도면이다. 1 is a view for explaining a conventional closed space discrimination method.

도 1에 도시된 바와 같이, 메모리의 데이터공간에는, 프로그램에서 정의된 변수에 대응되는 주소들의 영역인 스택(110; Stack), 상기 변수가 힙변수인 경우에 그 힙변수의 값들을 저장하는 공간인 힙(120; Heap), 및 상기 힙 내에 저장된 변수 값들의 시작주소와 변수값이 차지하는 메모리의 크기데이터를 저장하는 메모리할당테이블(Memory Allocation Table)영역이 형성된다. As shown in FIG. 1, in the data space of a memory, a stack 110, which is an area of addresses corresponding to a variable defined in a program, and a space for storing values of the heap variable when the variable is a heap variable. The heap 120 and a memory allocation table area for storing the start address of the variable values stored in the heap and the size data of the memory occupied by the variable value are formed.

일예로, C를 기반으로 하여 형성된 아래 (표1)와 같은 일련의 명령어 집합에 의해 메모리의 데이터공간이 할당되는 종래의 과정은 다음과 같다. For example, a conventional process of allocating a data space of a memory by a series of instruction sets as shown in Table 1 below based on C is as follows.

Heat 명령어command 제1열First row void test() void test () 제2열Second row { { 제3열Third row int intVar=1240;int intVar = 1240; 제4열Fourth row long longVar=1240;long longVar = 1240; 제5열Fifth row Object* objVar=new Object();Object * objVar = new Object (); 제6열Sixth row ........ 제7열The seventh row } }

(표 1) Table 1

상기 제3열의 명령이 수행될 때, 스택(110)의 제1공간(111)에는, 상기 스택변수 "invVar"의 값 1240을 저장하고, 마찬가지로, 상기 제4열의 명령이 수행될 때, 스택(110)의 제2공간(112)에는, 상기 스택변수 "longVar"의 값 1240을 저장된다. When the command of the third column is executed, the value 1240 of the stack variable “invVar” is stored in the first space 111 of the stack 110. Similarly, when the command of the fourth column is executed, the stack ( In the second space 112 of 110, a value 1240 of the stack variable “longVar” is stored.

상기 제5열의 명령이 수행될 때에는, 힙변수 "objVar"의 값을 저장하기 위한 공간을 힙(120)에 할당하기 위하여, (1) 스택(110)의 제3공간(113)에는 상기 힙(120)의 설정된 제1공간(121)의 주소데이터를 저장하고, (2) 상기 메모리할당테이블영역 (130)의 특정공간(131)에는, 상기 힙(120)의 제1공간(121)의 시작주소 (####) 및 상기 힙변수 "objVar"의 값을 저장하기 위한 메모리의 크기데이터(△)를 각각 저장한다. When the command of the fifth column is executed, in order to allocate a space for storing the value of the heap variable “objVar” to the heap 120, (1) the third space 113 of the stack 110 includes the heap ( 120 stores address data of the set first space 121, and (2) in the specific space 131 of the memory allocation table area 130, the start of the first space 121 of the heap 120; Size data Δ of memory for storing an address (####) and a value of the heap variable “objVar” are stored.

표 1의 명령어 집합에서는 일예로 하나의 힙변수가 정의되는 것을 표시하였으나, 복수개의 힙변수가 정의되는 경우에는 힙(120) 내의 그 복수개의 공간이 그 변수들에 할당되고, 메모리할당테이블영역(130)에도 그 복수개의 공간이 사용되게 된다. In the instruction set of Table 1, for example, one heap variable is defined, but when a plurality of heap variables are defined, the plurality of spaces in the heap 120 are allocated to the variables, and the memory allocation table area ( 130, the plurality of spaces are used.

이와 같이 메모리가 사용된 상태에서, 통상적인 폐공간판별 과정, 특히 폐공간인지 판별할 대상이 되는가를 판단하는 과정은 다음과 같다. In the state where the memory is used as described above, the process of determining whether the target is a normal closed space discrimination process, in particular, whether it is a closed space is as follows.

즉, 스택(110)에 형성된 각각의 변수공간에 대하여 그 값을 추출(retrieve)하여 그 값이 상기 메모리할당테이블영역(130)에 저장된 메모리할당테이블에 포함되어 있는가를 판단하게 된다. That is, the value is retrieved for each variable space formed in the stack 110 to determine whether the value is included in the memory allocation table stored in the memory allocation table region 130.

도 1을 참조로 보다 구체적으로 설명하면, 스택(110)의 제1공간(111)에 저장된 값 1240이 메모리할당테이블영역(130)에 저장된 메모리할당테이블에 포함되었는가를 판단하게 되는데, 이 과정에서 메모리할당테이블의 모든 값들과 비교하게 된다. Referring to FIG. 1, it is determined whether the value 1240 stored in the first space 111 of the stack 110 is included in the memory allocation table stored in the memory allocation table region 130. Compare all the values in the memory allocation table.

스택(110)의 제2공간(112) 및 제3공간(113)에 관해서도 동일한 과정이 반복되는데, 이에 따라 도 1의 예에 관해서는 제1,2공간(111,112)에 관해서는 폐공간인지 판단이 불필요한 공간으로, 제3공간(113)에 관해서는 폐공간인지의 판단이 필요한 공간으로 판단하게 되는 것이다. The same process is repeated with respect to the second space 112 and the third space 113 of the stack 110. Accordingly, the first and second spaces 111 and 112 of the stack 110 are determined to be closed spaces. As the unnecessary space, the third space 113 is determined to be a space in which it is necessary to determine whether it is a closed space.

스택에 저장된 데이터가 스택변수의 변수값인지, 힙변수의 주소정보인지(이하 "변수의 타입"이라 한다)가 별도의 데이터로 저장/관리되는 경우에는 이와 같은 폐공간 판별대상인가의 여부가 크게 문제되지 않을 것이나, 변수의 타입이 별도로 저장/관리되기 힘든 응용프로그램 수행환경이 다양하게 존재한다. 실제로, C, C++ 등과 같은 많은 언어(high level language)를 이용하여 제작된 응용프로그램 수행환경에서는 변수의 타입이 별도로 저장/관리되지 않는다. When the data stored on the stack is stored as a separate data, whether it is a variable value of a stack variable or an address information of a heap variable (hereinafter referred to as a "type of variable"), it is largely determined whether such a waste space is determined. This should not be a problem, but there are various application execution environments in which variable types cannot be stored and managed separately. In practice, variable types are not stored / managed in an application execution environment created using many languages such as C and C ++.

따라서 이와 같이 변수의 타입이 별도로 저장/관리되지 않는 경우에, 통상적인 방법에 의하면, n 개의 데이터에 관하여 메모리할당테이블 내에 m 개의 항목들이 존재한다면, 폐공간회수를 위해 고려해야 할 변수들인가를 판단하기 위해서는 최소한 n*m 개의 비교과정이 필요하게 되는 것이다. Therefore, in the case where the variable type is not stored / managed in this way, according to the conventional method, if m items exist in the memory allocation table for n data, it is determined whether the variables should be considered for waste space recovery. In order to do this, at least n * m comparisons are required.

따라서, 본 발명은 스택의 특정공간에 대응되는 변수가 힙변수인가의 여부가 별도의 데이터로 저장되지 않는 경우에도 폐공간판별을 보다 빠른 시간 내에 그리고 안정적으로 수행할 수 있는 메모리의 데이터 저장공간 관리 방법, 그 방법을 기록한 기록매체 및 그 방법을 이용한 응용프로그램 수행장치를 제공하는 것을 목적으로 한다. Therefore, the present invention manages the data storage space of the memory that can perform the waste space discrimination more quickly and stably even if the variable corresponding to the specific space of the stack is not stored as a separate data. It is an object of the present invention to provide a method, a recording medium recording the method, and an application program execution device using the method.

상기 목적을 달성하기 위하여 본 발명에 의한 메모리 데이터 저장공간 관리방법은, 힙변수 정의 명령어를 검출하는 경우에 스택의 특정주소에 상기 힙변수에 해당되는 힙변수 주소를 저장하고, 상기 힙변수 주소로부터 산출되는 힙슬롯 포인터 주소의 힙영역에 힙슬롯 주소를 저장하며, 상기 힙슬롯 주소의 메모리에는, 설정된 조건을 만족하는 참조값을 저장하는 것을 특징으로 한다. In order to achieve the above object, the memory data storage space management method according to the present invention stores a heap variable address corresponding to the heap variable at a specific address of a stack when a heap variable definition instruction is detected, and stores the heap variable address from the heap variable address. The heap slot address is stored in the calculated heap slot pointer address heap area, and a reference value satisfying a set condition is stored in the heap slot address memory.

이러한 본 발명의 메모리 데이터 저장공간 관리방법에는 폐공간회수를 위한 변수영역인가를 판단하는 과정을 더 포함되는 것이 바람직한데, 이러한 변수영역 여부 판단과정으로서, 상기 스택에 저장된 값을 상기 힙변수 주소로 하여 힙슬롯 포인터 주소를 산출하고, 산출된 힙슬롯 포인터 주소에 저장된 값이 지칭하는 주소에 저장된 기준값을 추출하며, 상기 기준값이 상기 설정된 조건을 만족하는 경우에, 상기 스택에 저장된 값을 주소로 하는 힙변수의 변수값 저장공간을 회수할 것인가 결정하는 데이터 저장공간 회수단계를 더 포함하는 것이 바람직하다. The memory data storage space management method of the present invention preferably further includes a step of determining whether or not a variable area for waste space recovery. As the process of determining whether or not a variable area is used, a value stored in the stack is used as the heap variable address. Calculates a heap slot pointer address, extracts a reference value stored at an address indicated by the value stored in the calculated heap slot pointer address, and, when the reference value satisfies the set condition, sets the value stored in the stack as an address. The method may further include a data storage space retrieval step of determining whether to recover the variable value storage space of the heap variable.

상기 힙슬롯 포인터 주소는 힙변수 주소보다 한 데이터영역 선행하는 값으로 산출되는 것이 바람직하다. Preferably, the heap slot pointer address is calculated to be one data area preceding the heap variable address.

상기 설정된 조건은, 임의의 조건으로 할 수 있으나, 일예로, 상기 설정된 조건은, 상기 힙슬롯 포인터 주소와 같을 조건으로 하거나, 기설정된 값일 조건으로 할 수 있다. The set condition may be any condition. For example, the set condition may be a condition equal to the heap slot pointer address or a preset value.

프로그램 작성자의 편의를 더욱 도모하기 위하여, 본 발명의 메모리 데이터 저장공간 관리방법은, 상기 힙변수 정의 명령어에 의해 정의되는 힙변수에 관하여 폐공간회수를 하지 않을 것을 지시하는 금지명령어를 검출하는 경우에, 기설정된 금지코드를 상기 힙슬롯 주소로부터 산출되는 플래그 주소의 메모리에 저장하는 단계; 및 상기 금지명령어에 대응되는 설정명령어를 검출하는 경우에, 상기 금지코드를 상기 플래그 주소의 메모리에서 삭제하는 단계를 더 포함할 수 있다. In order to further facilitate the convenience of the programmer, the memory data storage space management method of the present invention may detect a prohibition instruction for instructing not to perform a waste space recovery on a heap variable defined by the heap variable definition instruction. Storing a predetermined prohibition code in a memory of a flag address calculated from the hipslot address; And when the setting command corresponding to the prohibition command is detected, deleting the prohibition code from the memory of the flag address.

이 때, 폐공간회수를 위한 변수영역인가를 판단함에 있어, 상기 플래그 주소에 상기 금지코드가 저장되었는지 판단하고, 상기 금지코드가 플래그 주소에 저장되어 있지 않은 경우에 한하여 상기 데이터 저장공간 회수단계를 수행하는 것이 바람직하다. At this time, in determining whether the variable area is for the waste space recovery, it is determined whether the prohibition code is stored in the flag address, and the data storage space recovery step is performed only when the prohibition code is not stored in the flag address. It is preferable to carry out.

이러한 본 발명의 메모리 데이터 저장공간 관리방법은 이를 수행하기 위한 일련의 명령어 집합으로서 컴퓨터로 판독할 수 있는 기록매체에 기록되어 제작/배포될 수 있다. The memory data storage space management method of the present invention is a set of instructions for carrying out this, and can be recorded and produced / distributed on a computer-readable recording medium.

이러한 본 발명의 메모리 데이터 저장공간 관리방법을 이용한 본 발명의 응용프로그램수행장치는, 설정된 프로그램에 의해 동작하는 마이크로프로세서 및 상기 응용프로그램의 수행 중에 필요한 데이터를 저장하는 하나 이상의 메모리를 포함하되, 상기 마이크로프로세서 및 상기 하나 이상의 메모리 중 어느 하나에 상기 응용프로그램의 명령어 집합이 저장되고, 상기 마이크로프로세서 및 상기 하나 이상의 메모리 중 어느 하나에는, 상기 본 발명의 메모리 데이터 저장공간 관리방법을 수행하는 일련의 명령어 집합이 저장된 것을 특징으로 하는 응용프로그램 수행장치. The application program execution apparatus of the present invention using the memory data storage space management method of the present invention includes a microprocessor operating by a set program and one or more memories for storing data necessary for the execution of the application program, the micro A set of instructions of the application program is stored in any one of a processor and the one or more memories, and in any one of the microprocessor and the one or more memories, a set of instructions for performing the memory data storage space management method of the present invention. Application program execution apparatus characterized in that the stored.

이하, 본 발명의 실시예를 첨부된 도면의 의거하여 상세히 설명하면 다음과 같다. Hereinafter, the embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 2는 본 발명의 실시예의 응용프로그램 수행장치를 도시한 블록도이다. Figure 2 is a block diagram showing an application program execution apparatus of an embodiment of the present invention.

도 2에 도시된 바와 같이, 본 발명의 실시예의 응용프로그램 수행장치는, 설정된 프로그램에 의해 동작하는 마이크로프로세서(210), 상기 응용프로그램의 수행 중에 필요한 데이터를 저장하는 하나 이상의 메모리(220)를 포함한다. As shown in FIG. 2, the apparatus for executing an application of an embodiment of the present invention includes a microprocessor 210 that is operated by a set program, and one or more memories 220 that store data necessary during execution of the application. do.

상기 메모리(220)에는 상기 필요한 데이터를 저장하기 위한 데이터 저장공간(260)이 형성되어 있다. The memory 220 has a data storage space 260 for storing the necessary data.

상기 응용프로그램은, 상기 마이크로프로세서(210) 및 상기 하나 이상의 메모리(220) 중 어느 것에 저장된 것으로 하여도 무방하며, 바람직하게는 상기 메모리 중 응용프로그램 저장공간(250)에 저장된다. The application program may be stored in any one of the microprocessor 210 and the one or more memories 220, and is preferably stored in the application program storage space 250 of the memory.

상기 마이크로프로세서(210) 및 상기 하나 이상의 메모리(220) 중 어느 한 곳에는, 상기 응용프로그램을 수행하기 위한 일련의 명령어집합(이하 "오퍼레이팅 시스템"(OS)이라 한다)을 저장하는 OS저장부(230)가 형성되고, 후술하는 본 발명의 제1,2실시예의 메모리 데이터 저장공간 관리방법을 수행하기 위한 일련의 명령어 집합들이 저장되는 제1,2저장부(240,245)가 형성된다. In one of the microprocessor 210 and the one or more memories 220, an OS storage unit for storing a series of instructions (hereinafter referred to as "operating system" (OS)) for executing the application program ( 230 is formed, and first and second storage units 240 and 245 are formed to store a series of command sets for performing the method of managing memory data storage spaces according to the first and second embodiments of the present invention.

상기 오퍼레이팅 시스템(OS)은, 다양한 형태로 당업자에게 자명하게 구현되고 있으므로, 보다 상세한 기재를 생략한다. Since the operating system (OS) is embodied in various forms obvious to those skilled in the art, more detailed description is omitted.

상기 응용프로그램은, 상기 마이크로프로세서(210)의 내장된 기능을 이용하여 동작하고 상기 데이터 저장공간(260)에 접근하는 명령어를 포함하는 임의의 명령어집합으로 할 수 있으며, 그 원천코드(Source code)가 어떠한 명령어체계(일예로, C, C++, 파스칼, 자바 등)에 기원하는가를 불문한다. The application program may be any set of instructions including instructions that operate using the built-in functions of the microprocessor 210 and access the data storage space 260, the source code of which is the source code. Does not originate from any instructional system (eg C, C ++, Pascal, Java, etc.).

상기 데이터 저장공간(260)은, 상기 응용프로그램에서 정의되는 변수에 직접 대응되는 값(즉, 일예로 스택변수인 경우에는 그 변수값, 힙변수인 경우에는 그 변수의 변수값 저장주소)을 저장하는 스택(270; Stack), 상기 응용프로그램에서 정의되는 변수가 힙변수인 경우에 그 변수의 변수값을 저장하는 힙(280; Heap), 그리고 상기 데이터 저장공간(260) 내의 설정된 저장공간(290; 이하 "힙슬랏"이라 한다)을 포함한다. The data storage space 260 stores a value (ie, a variable value in the case of a stack variable and a variable value storage address of the variable in the case of a heap variable) corresponding directly to a variable defined in the application program. A stack 270, a heap for storing a variable value of the variable when the variable defined in the application program is a heap variable, and a set storage space 290 in the data storage space 260. (Hereinafter referred to as "hipslot").

상기 "힙슬랏"의 용어는 특정한 저장공간을 호칭하기 위한 것으로서 그 용어를 구성하는 단어들에 의해 한정되지 않는 것으로 해석되어야 한다. The term "hipslot" is intended to refer to a specific storage space and should not be construed as being limited by the words constituting the term.

본 발명의 실시예의 응용프로그램 수행장치는 후술하는 본 발명의 제1,2실시예의 데이터 저장공간 관리방법에 의해 그 기능이 명확하여질 것이다. An application executing apparatus of an embodiment of the present invention will be clarified in its function by the data storage space management method of the first and second embodiments of the present invention described below.

다만, 상기 본 발명의 실시예의 응용프로그램 수행장치의 기본적인 구성은, 구체적인 예로써, 개인용컴퓨터(personal computer), 노트북(notebook), 및 개인정보단말기(Personal Digital Assistant; PDA) 뿐만 아니라, 일정관리, 전자메일관리 등과 같은 특정한 응용프로그램의 수행이 지원되는 휴대폰 등 다양하게 구현되고 있으므로 더욱 상세한 기재를 생략하며, 따라서 본 발명의 실시예에 의한 응용프로그램 수행장치는 이러한 구체적인 실시형태 중 어느 것에 해당하는 것으로도 해석될 수 있으며, 따라서 본 발명의 응용프로그램 수행장치는 이러한 구체적인 실시형태를 포함하는 범위로 보호되어야 한다. However, the basic configuration of the application program execution apparatus of the embodiment of the present invention, as a specific example, personal computer, notebook, and personal digital assistant (PDA), as well as schedule management, Since various implementations such as mobile phones that support the execution of specific applications, such as e-mail management, are omitted in detail, the application execution apparatus according to an embodiment of the present invention corresponds to any of these specific embodiments. It is also possible to interpret the application execution device of the present invention to be protected to the extent that includes these specific embodiments.

도 3은 상기 데이터 저장공간(260) 내에 저장된 데이터들의 상호관계를 도시한 블록도이고, 도 4는 본 발명의 제1실시예의 데이터 저장공간 관리방법을 도시한 흐름도이며, 도 5는 본 발명의 제2실시예의 데이터 저장공간 관리방법을 도시한 흐름도이다. 3 is a block diagram illustrating the interrelationship of data stored in the data storage space 260, FIG. 4 is a flowchart illustrating a data storage space management method according to a first embodiment of the present invention, and FIG. It is a flowchart showing a data storage space management method of the second embodiment.

이하 본 발명의 제1,2실시예의 데이터 저장공간 관리방법을 도 3, 도 4, 및 도 5를 참조로 상세히 설명한다. Hereinafter, a method of managing data storage spaces of the first and second embodiments of the present invention will be described in detail with reference to FIGS. 3, 4, and 5.

도 4는 본 발명의 제1실시예의 데이터 저장공간 관리방법을 도시한 흐름도로서, 보다 구체적으로는, 상기 응용프로그램의 수행과정에서 발생할 수 있는 힙변수 정의에 대하여 메모리의 데이터 저장공간이 보다 효율적으로 관리될 수 있도록 메모리의 데이터 저장공간을 운용하는 방법에 관한 것이다. 4 is a flowchart illustrating a data storage space management method according to a first embodiment of the present invention. More specifically, the data storage space of the memory is more efficiently used for the heap variable definition that may occur during the execution of the application program. The present invention relates to a method of operating a data storage space of a memory to be managed.

본 발명의 제1실시예의 데이터 저장공간 관리방법은, 응용프로그램의 수행과정에서 힙변수를 정의하는 명령어(이하 "힙변수 정의 명령어"를 검출하는 경우(S405)에, 도 4에 도시된 바와 같이, 스택(270)의 특정 주소에 상기 힙변수에 해당되는 제1주소(이하 "힙변수 주소"라 한다) 데이터를 저장한다(S410). In the method of managing data storage space according to the first embodiment of the present invention, when a command for defining a heap variable (hereinafter, a "heap variable definition command" is detected (S405)) in the course of executing an application program, as shown in FIG. 4. In operation S410, a first address corresponding to the heap variable (hereinafter, referred to as a "heap variable address") data is stored at a specific address of the stack 270.

상기 힙변수 정의 명령어는 다양한 형태가 가능하며 또한 현실적으로 구현되고 있다. 일예로 C++에 기원하는 명령어의 경우에, 그 기원된 원천코드(source code)는 "Object* objVar=new Object();"의 형태로 작성될 수 있으며, 따라서 상기 힙변수 정의 명령어는 상기 형태로 작성어 컴파일(compile)된 기계어코드(machine language code)로 할 수 있다. The heap variable definition command is available in various forms and is practically implemented. For example, in the case of an instruction originating in C ++, the originating source code may be written in the form of "Object * objVar = new Object ();", so that the heap variable definition instruction is in this form. Written machine code can be compiled machine code.

상기 힙변수 주소는 힙(280)내에서 상기 힙변수의 변수값을 저장하는 주소 데이터로 할 수 있다. The heap variable address may be address data for storing a variable value of the heap variable in the heap 280.

이 과정(S410)에 의해, 도 3에 도시된 바와 같이, 스택(270)의 제1저장공간 (271)에는 힙변수(일예로 상기 형태의 원천코드의 경우 objVar)의 변수값 저장공간 (286)의 주소(HeapVar1)가 저장되게 되는 것이다. By this process (S410), as shown in FIG. 3, the first storage space 271 of the stack 270 includes a variable value storage space 286 of a heap variable (eg, objVar for the source code of the above type). ) 'S address (HeapVar1) will be saved.

힙변수 주소를 저장(S410)한 후에는, 상기 힙변수 주소로부터 산출되는 제2주소(이하 "힙슬롯 포인터 주소"라 한다)의 힙 저장영역에 제3주소(이하 "힙슬롯 주소"라 한다) 데이터를 저장한다(S420). After storing the heap variable address (S410), a third address (hereinafter referred to as "heap slot address") is stored in the heap storage area of the second address (hereinafter referred to as "heap slot pointer address") calculated from the heap variable address. Save data (S420).

보다 구체적으로, 상기 힙슬롯 포인터 주소는 힙변수 주소보다 한 데이터영역 선행하는 값으로 산출된다. 이는 즉, 정의되는 힙변수의 변수값 저장공간의 헤더(header)로서 특정한 주소를 저장하고자 하는 것이며, 이렇게 함으로써 힙(280) 내의 데이터 저장체계를 단순하게 할 수 있다. 상기 한 데이터 영역은, 하나의 데이터에 부여되는 주소의 개수에 따라 달라지며, 일예로, 64비트(bit) 컴퓨터의 경우에는 8 바이트(byte), 32비트(bit) 컴퓨터의 경우에는 4 바이트(byte)를 차지한다. More specifically, the heap slot pointer address is calculated as a data region preceding the heap variable address. That is, it is intended to store a specific address as a header of the variable value storage space of the defined heap variable, thereby simplifying the data storage system in the heap 280. The one data area depends on the number of addresses given to one data. For example, 8 bytes for a 64-bit computer and 4 bytes for a 32-bit computer. byte).

상기 힙슬롯 주소는, 메모리의 데이터 저장공간(260) 내에서 자유로이 그 저장된 값을 치환할 수 있는 주소이기만 하면, 임의의 값으로 할 수 있다. 다만, 상기 데이터 저장공간(260) 내에서 임의로 구획된 상기 힙슬롯(290)내에서 순차적으로 산출되는 주소로 하는 것이 바람직하다. The heap slot address may be any value as long as it is an address capable of freely replacing the stored value in the data storage space 260 of the memory. However, it is preferable that the address is sequentially calculated in the hip slot 290 arbitrarily partitioned in the data storage space 260.

이 과정(S420)에 의해, 도 3에 도시된 바와 같이, 힙(280)의 제1저장공간 (281)에는 힙슬롯(290)의 제1저장공간(291)의 주소가 저장되게 되고, 힙(280)의 제1데이터공간(286)에는 힙변수의 변수값을 저장하는 영역이 확보된다. By this process (S420), as shown in FIG. 3, the address of the first storage space 291 of the hip slot 290 is stored in the first storage space 281 of the heap 280, An area for storing the variable value of the heap variable is secured in the first data space 286 of 280.

힙슬롯 주소를 저장(S420)한 후에는, 상기 힙슬롯 주소의 데이터 저장공간 (291)에, 상기 힙슬롯 포인터 주소와 설정된 조건을 만족하는 참조값을 저장한다 (S430). After storing the heap slot address (S420), a reference value satisfying the heap slot pointer address and a set condition is stored in the data storage space 291 of the hip slot address (S430).

상기 설정된 조건은, 임의의 조건으로 할 수 있으나, 일예로, 상기 참조값은 힙슬롯 포인터 주소와 같은 값일 것으로 할 수 있다. 즉, 상기 힙슬롯(290)의 제1저장공간(291)에 상기 힙슬롯 포인터 주소 값이 저장되는 것이다. The set condition may be any condition. For example, the reference value may be the same value as the heap slot pointer address. That is, the heap slot pointer address value is stored in the first storage space 291 of the hip slot 290.

상기 설정된 조건의 또 다른 바람직한 예로는, 참조값이 기설정된 상수값일 것으로 할 수 있다. As another preferred example of the set condition, the reference value may be a predetermined constant value.

이와 같은 과정(S410~S430)이 반복되는 경우에는 스택(270), 힙(280), 및 힙슬롯(290)의 데이터 저장공간 사이에서 상호간의 참조관계가 도 3과 같이 형성될 것임은 자명하다. When such processes S410 to S430 are repeated, it is apparent that a reference relationship between the stack 270, the heap 280, and the data storage space of the heap slot 290 is formed as shown in FIG. 3. .

이상과 같은 과정(S410~S430)에 더하여, 본 발명의 제1실시예의 데이터 저장공간 관리방법은, 정의된/정의되는 힙변수에 관하여 폐공간회수를 하지 않을 것을 지시하는 금지명령어 및 그 금지명령어에 의한 작용을 중단할 것을 지시하는 금지해제명령어를 응용프로그램에서 사용할 수 있도록 하기 위한 구성을 부가한다. In addition to the above process (S410 ~ S430), the data storage space management method of the first embodiment of the present invention, the prohibition command and the prohibition command to instruct not to waste space recovery for the defined / defined heap variable Add a configuration to make the unrestricted command available to the application, instructing it to abort the action.

이를 위하여, 상기 금지명령어를 검출하는 경우(S435)에 기설정된 코드(이하 "금지코드"라 한다)를 상기 힙슬롯 주소로부터 산출되는 제4주소(이하 "플래그 주소"라 한다)의 메모리에 저장하고(S440), 상기 금지해제명령어를 검출하는 경우(S445)에 상기 금지코드를 상기 플래그 주소의 메모리로부터 제거한다(S450). To this end, in the case where the inhibit instruction is detected (S435), a predetermined code (hereinafter referred to as a "prohibition code") is stored in a memory of a fourth address (hereinafter referred to as "flag address") calculated from the heap slot address. When the inhibit release command is detected (S440), the prohibited code is removed from the memory of the flag address (S450).

상기 금지명령어 및 금지해제명령어는 당업자에 의해 임의의 명령어로 설정될 수 있으며, 상기 금지코드는 당업자에 의해 임의의 코드로 설정될 수 있다. The prohibition command and the prohibition command may be set to any command by those skilled in the art, and the prohibition code may be set to any code by those skilled in the art.

상기 플래그 주소는 상기 데이터 저장공간(260) 내에서 그 저장된 값을 자유로이 치환할 수 있는 임의의 저장공간의 주소로 할 수 있으나, 바람직하게는 상기 힙슬롯(290)에 인접한 주소로 할 수 있다. The flag address may be an address of any storage space that can freely replace the stored value in the data storage space 260, but may preferably be an address adjacent to the heap slot 290.

이와 같은 본 발명의 제1실시예의 메모리 데이터 저장공간 관리방법을 이용한 제2실시예의 메모리 데이터 저장공간 관리방법을 도 3 및 도 5를 참조로 설명한다. The memory data storage space management method of the second embodiment using the memory data storage space management method of the first embodiment of the present invention will be described with reference to FIGS. 3 and 5.

도 5는 본 발명의 제2실시예의 데이터 저장공간 관리방법을 도시한 흐름도로서, 보다 구체적으로는, 상기 제1실시예의 데이터 저장공간 관리방법을 활용하여, 상기 응용프로그램의 수행과 병렬적으로 혹은 순차적으로 수행될 수 있는 메모리 폐공간회수를 위한 변수영역 판단과정에 관한 것이다. 5 is a flowchart illustrating a data storage space management method according to a second embodiment of the present invention. More specifically, the data storage space management method according to the first embodiment may be utilized in parallel with the execution of the application program. The present invention relates to a process for determining a variable region for memory waste space recovery that can be performed sequentially.

후술하는 본 발명의 제2실시예의 데이터 저장공간 관리방법은, 전술한 제1실시예의 방법을 기초로 하여 짝으로 수행되는 것이므로, 상기 제1실시예의 설명에서 정의된 용어들은 동일한 의미로 사용된다. Since the data storage space management method of the second embodiment of the present invention described below is performed in pairs based on the method of the first embodiment described above, the terms defined in the description of the first embodiment are used in the same meaning.

도 5에 도시된 바와 같이, 제2실시예의 데이터 저장공간 관리방법은, 먼저, 스택에 저장된 값(이하 "스택값"이라 한다)을 추출한다(S510). As shown in FIG. 5, in the data storage space management method of the second embodiment, first, a value stored in the stack (hereinafter referred to as a “stack value”) is extracted (S510).

이 때 일예로, 도 3을 참조로, 스택(270)의 제1저장공간(271)에 저장된 주소(HeapVar1)가 스택값으로 추출되게 된다. At this time, as an example, referring to FIG. 3, an address HeapVar1 stored in the first storage space 271 of the stack 270 is extracted as a stack value.

상기 스택값이 힙변수의 변수값 저장주소에 관한 것이라면 상기 스택값은 제1실시예의 방법에 의해 저장되는 힙변수 주소가 추출되게 된다. If the stack value relates to a variable value storage address of the heap variable, the stack value is extracted from the heap variable address stored by the method of the first embodiment.

따라서, 이와 같이 추출된 스택값을, 제1실시예의 방법에서 설명한 힙변수 주소로 가정하여 힙슬롯 포인터 주소를 산출한다(S520). Accordingly, the heap slot pointer address is calculated by assuming that the stack value thus extracted is the heap variable address described in the method of the first embodiment (S520).

즉, 상기 힙슬롯 포인터 주소는 상기 스택값보다 한 데이터영역 선행하는 값으로 산출하게 되며, 따라서, 도 3을 참조로, 상기 힙(280) 내의 제1저장공간(281)의 주소가 산출된다. That is, the heap slot pointer address is calculated to be one data region preceding the stack value. Accordingly, the address of the first storage space 281 in the heap 280 is calculated with reference to FIG. 3.

그리고 상기 산출된 힙슬롯 포인터 주소에 저장된 값(이하 "포인터값"이라 한다)을 추출한다(S530). 따라서 상기 힙(280) 내의 제1저장공간(281)에 저장된 값, 즉 힙슬롯(290)의 제1저장공간(291)의 주소가 포인터 값으로 추출된다. A value stored in the calculated heap slot pointer address (hereinafter referred to as a "pointer value") is extracted (S530). Therefore, a value stored in the first storage space 281 in the heap 280, that is, an address of the first storage space 291 of the heap slot 290 is extracted as a pointer value.

만약 스택값이 힙변수의 변수값 저장주소에 관한 것이라면 상기 포인터 값은 힙슬롯 주소를 가리키게 되는데, 따라서 이러한 포인터값을 힙슬롯 주소로 가정하여, 그 주소에 저장된 값(이하 "기준값"이라 한다)을 추출한다(S540). 즉, 힙슬롯(290)의 제1저장공간(291)에 저장된 값이 기준값으로 추출되는 것이다. If the stack value is for a variable storage address of a heap variable, the pointer value points to a heap slot address. Therefore, assuming that the pointer value is a heap slot address, the value stored at the address (hereinafter referred to as "reference value") It is extracted (S540). That is, the value stored in the first storage space 291 of the hip slot 290 is extracted as a reference value.

이와 같은 과정에 의해 추출된 기준값이 설정된 조건을 만족하는지 판단 (S550)함으로써, 스택값이 지칭하는 힙변수 주소에 저장된 값이 힙변수의 변수값에 관한 것인지를 판단할 수 있다. By determining whether the reference value extracted by the above process satisfies the set condition (S550), it may be determined whether the value stored in the heap variable address indicated by the stack value is related to the variable value of the heap variable.

상기 설정된 조건은, 상기 제1실시예의 데이터 저장공간 관리방법의 단계(S430)에서 참조값에 관하여 설정된 조건과 동일하게 설정된다. 즉, 상기 기준값이 상기 힙슬롯 포인터 주소와 동일한지 판단하는 것으로 할 수 있으며, 또 다른 바람직한 예로는, 상기 기준값이 상기 제1실시예의 방법에서 설정된 상수값과 같은지를 판단하는 것으로 할 수 있다. The set condition is set equal to the condition set for the reference value in step S430 of the data storage space management method of the first embodiment. That is, it may be determined whether the reference value is the same as the hipslot pointer address, and as another preferred example, it may be determined whether the reference value is equal to a constant value set in the method of the first embodiment.

상기 기준값이 상기 설정된 조건을 만족하는 경우에는, 상기 스택값을 주소로 하는 저장공간(286), 바람직하게는 이에 더하여 상기 힙슬롯 포인터 주소의 저장공간(281)의 회수여부를 결정한다(S570). When the reference value satisfies the set condition, it is determined whether the storage space 286 having the stack value as an address, preferably, the number of times the storage space 281 of the hip slot pointer address is recovered (S570). .

상기 회수여부결정(S570)은 당업자에 의해 바람직하다고 판단되는 임의의 과정에 의해 판단할 수 있고, 그 구체적인 사항 또한 당업자에게 자명한 바 더욱 상세한 기재를 생략한다. The recovery availability determination (S570) can be determined by any process deemed desirable by those skilled in the art, the details thereof will be omitted to those skilled in the art will be omitted.

이러한 과정(S510~S570)을, 스택 내의 모든 데이터에 관하여 수행(S580)함으로써, 힙(280)내의 폐공간을 효율적으로 관리할 수 있다. By performing these processes (S510 to S570) with respect to all data in the stack (S580), it is possible to efficiently manage the waste space in the heap 280.

이 과정(S510~S570)의 수행과정에서 만약 스택(270)에 저장된 데이터가 힙변수의 변수값 저장주소가 아닌 경우, 즉, 일예로 스택변수의 변수값인 경우에는, 그 변수값을 주소데이터로 인식하여 상기 기준값을 추출하는 경우에 그 기준값은 상기 설정된 조건을 만족하지 않게 된다. If the data stored in the stack 270 is not the variable value storage address of the heap variable, that is, for example, the variable value of the stack variable, the variable value is the address data. When the reference value is extracted and the reference value is not recognized, the reference value does not satisfy the set condition.

따라서, 스택(270) 내에 저장된 데이터가 n 개인 경우에, 폐공간 회수여부의 판단대상이 될 것인가 판단하기 위해 소요되는 판단단계는 총 "1*n"으로서 종래 기술에 의한 m*n 보다 그 처리과정이 확연하게 축소됨을 알 수 있다. Therefore, when n data are stored in the stack 270, the determination step required to determine whether the waste space is to be recovered is a total of "1 * n", which is more than that of m * n according to the prior art. It can be seen that the process is significantly reduced.

이상과 같은 과정(S510~S570)에 더하여, 보다 바람직한 제2실시예의 데이터 저장공간 관리방법은, 상기 제1실시예에서 설명한 플래그 주소에, 상기 금지코드가 저장되어 있는지 판단하고(S560), 상기 금지코드 판단단계(S560)에서 금지코드가 저장되어 있지 않은 경우에 한하여 해당되는 힙변수의 변수값 저장공간(282)의 회수여부를 결정하게 된다(S570). In addition to the above-described processes (S510 to S570), the more preferred method for managing the data storage space of the second embodiment determines whether the prohibition code is stored in the flag address described in the first embodiment (S560). Only when the prohibition code is stored in the prohibition code determination step (S560), it is determined whether the variable value storage space 282 of the corresponding heap variable is recovered (S570).

이러한 추가적인 과정(S560)에 의해, 통상적으로 응용프로그램의 수행과 병렬적으로 진행될 수 있는 폐공간회수 과정에서, 특정한 힙변수에 관해서는 폐공간회수과정을 수행하지 않을 것을 응용프로그램에서 지정할 수 있게 된다. By this additional process (S560), it is possible to specify in the application program not to perform the waste space recovery process for a particular heap variable in the waste space recovery process that can proceed in parallel with the execution of the application program in general. .

상기 본 발명의 제1,2실시예에 의한 메모리 데이터 저장공간 관리방법들은, 이를 수행하기 위한 일련의 명령어집합으로써 컴퓨터로 판독할 수 있는 기록매체에 각각 혹은 일체로 저장되어 배포될 수 있다. The memory data storage space management methods according to the first and second embodiments of the present invention may be distributed and stored individually or integrally in a computer-readable recording medium as a set of instructions for performing the same.

이상으로 본 발명의 실시예의 메모리 데이터 저장공간 관리방법, 그 방법을 기록한 기록매체 및 그 방법을 이용한 응용프로그램 수행장치에 관한 바람직한 실시예를 설명하였으나, 본 발명은 상기 실시예에 한정되지 아니하며, 본 발명의 실시예로부터 당해 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 의한 용이하게 변경되어 균등하다고 인정되는 범위의 모든 변경을 포함한다. As mentioned above, although the preferred embodiment of the memory data storage space management method, the recording medium recording the method, and the application program execution apparatus using the method have been described, the present invention is not limited to the above embodiment. It includes all the changes from the embodiment of the invention which is easily changed by those skilled in the art to which the invention belongs and is considered equivalent.

본 발명의 실시예에 의하면, 메모리의 폐공간판별에 소요되는 시간을 줄일 수 있고, 따라서 본 발명의 실시예의 메모리 데이터 저장공간 관리방법이 수행되는 동안 수행되는 타 프로그램의 구동속도를 향상시킬 수 있다. According to the embodiment of the present invention, it is possible to reduce the time required for the determination of the closed space of the memory, and thus to improve the driving speed of other programs performed while the memory data storage space management method of the embodiment of the present invention is performed. .

또한 본 발명의 실시예의 데이터 저장공간 관리방법은, 메모리 주소 데이터를 기초로 연산되므로, 그 연산에 필요한 마이크로프로세서의 구동시간을 최소화할 수 있다. In addition, since the data storage space management method of the embodiment of the present invention is calculated based on the memory address data, it is possible to minimize the driving time of the microprocessor required for the operation.

도 1은 통상적인 폐공간판별 방법을 설명하기 위한 도면이다. 1 is a view for explaining a conventional closed space discrimination method.

도 2는 본 발명의 실시예의 응용프로그램 수행장치를 도시한 블록도이다. Figure 2 is a block diagram showing an application program execution apparatus of an embodiment of the present invention.

도 3은 본 발명의 실시예의 데이터 저장공간 관리방법에서 데이터 저장공간 내에 저장된 데이터들의 상호관계를 도시한 블록도이다. 3 is a block diagram showing the interrelationships of data stored in a data storage space in the data storage space management method of the embodiment of the present invention.

도 4는 본 발명의 제1실시예의 데이터 저장공간 관리방법을 도시한 흐름도이다. 4 is a flowchart illustrating a data storage space management method according to a first embodiment of the present invention.

도 5는 본 발명의 제2실시예의 데이터 저장공간 관리방법을 도시한 흐름도이다. 5 is a flowchart illustrating a data storage space management method according to a second embodiment of the present invention.

Claims (9)

프로세서를 포함하는 응용프로그램 수행장치의 메모리 데이터 저장공간 관리방법으로서, 상기 프로세서는, A method of managing memory data storage space of an apparatus for executing an application program including a processor, the processor comprising: 힙변수 정의 명령어를 검출하는 경우에, 스택의 특정주소에 상기 힙변수에 해당되는 힙변수 주소를 저장하는 단계;When the heap variable definition command is detected, storing a heap variable address corresponding to the heap variable at a specific address of the stack; 상기 힙변수 주소로부터 산출되는 힙슬롯 포인터 주소의 힙영역에 힙슬롯 주소를 저장하는 단계; 및 Storing a heap slot address in a heap area of a heap slot pointer address calculated from the heap variable address; And 상기 힙슬롯 주소의 메모리에, 설정된 조건을 만족하는 참조값을 저장하는 단계를 수행하는 것을 특징으로 하는 메모리 데이터 저장공간 관리방법. And storing a reference value that satisfies a set condition in a memory of the heap slot address. 제1항에서, 상기 프로세서는, The processor of claim 1, wherein the processor comprises: 상기 스택에 저장된 값을 상기 힙변수 주소로 하여 힙슬롯 포인터 주소를 산출하고, 산출된 힙슬롯 포인터 주소에 저장된 값이 지칭하는 주소에 저장된 기준값을 추출하는 단계; Calculating a heap slot pointer address using the value stored in the stack as the heap variable address, and extracting a reference value stored at an address indicated by a value stored in the calculated heap slot pointer address; 상기 기준값이 상기 설정된 조건을 만족하는지 판단하는 단계; 및 Determining whether the reference value satisfies the set condition; And 상기 기준값이 상기 설정된 조건을 만족하는 경우에, 상기 스택에 저장된 값을 주소로 하는 힙변수의 변수값 저장공간을 회수할 것인가 결정하는 데이터 저장공간 회수단계를 더 수행하는 메모리 데이터 저장공간 관리방법. And retrieving a variable value storage space of a heap variable whose address is a value stored in the stack when the reference value satisfies the set condition. 제2항에서, In claim 2, 상기 힙슬롯 포인터 주소는 힙변수 주소보다 한 데이터영역 선행하는 값으로 산출되는 것을 특징으로 하는 메모리 데이터 저장공간 관리방법. And the heap slot pointer address is calculated as a value preceding one data area than the heap variable address. 제2항에서, In claim 2, 상기 설정된 조건은, 상기 힙슬롯 포인터 주소와 같을 조건인 것을 특징으로 하는 메모리 데이터 저장공간 관리방법. And the set condition is a condition equal to the heap slot pointer address. 제2항에서, In claim 2, 상기 설정된 조건은, 기설정된 값일 조건인 것을 특징으로 하는 메모리 데이터 저장공간 관리방법. The set condition is a condition that the predetermined value is a memory data storage space management method. 제2항에서, 상기 프로세서는, The processor of claim 2, wherein the processor comprises: 상기 힙변수 정의 명령어에 의해 정의되는 힙변수에 관하여 폐공간회수를 하지 않을 것을 지시하는 금지명령어를 검출하는 경우에, 기설정된 금지코드를 상기 힙슬롯 주소로부터 산출되는 플래그 주소의 메모리에 저장하는 단계; 및 Storing a predetermined prohibition code in a memory of a flag address calculated from the heap slot address when detecting a prohibition instruction indicating not to perform a closed space recovery with respect to the heap variable defined by the heap variable definition instruction; ; And 상기 금지명령어에 대응되는 설정명령어를 검출하는 경우에, 상기 금지코드를 상기 플래그 주소의 메모리에서 삭제하는 단계를 더 수행하는 메모리 데이터 저장공간 관리방법. And deleting the prohibition code from the memory of the flag address when detecting a setting command corresponding to the prohibition command. 제6항에서, In claim 6, 상기 프로세서는 상기 플래그 주소에 상기 금지코드가 저장되었는지 판단하는 단계를 더 수행하고, The processor further determines whether the inhibit code is stored in the flag address, 상기 데이터 저장공간 회수단계는, 상기 금지코드가 플래그 주소에 저장되어 있지 않은 경우에 한하여 수행되는 것을 특징으로 하는 메모리 데이터 저장공간 관리방법. And the data storage space retrieval step is performed only when the prohibition code is not stored in the flag address. 제1항 내지 제7항 중 어느 한 항의 방법을 수행하기 위한 일련의 명령어 집합을 기록한 컴퓨터로 판독할 수 있는 기록매체. A non-transitory computer-readable recording medium having recorded thereon a set of instructions for carrying out the method of claim 1. 응용프로그램을 수행하는 장치로서, A device that runs an application. 설정된 프로그램에 의해 동작하는 마이크로프로세서 및 A microprocessor operated by a configured program and 상기 응용프로그램의 수행 중에 필요한 데이터를 저장하는 하나 이상의 메모리를 포함하고, At least one memory for storing data necessary during the execution of the application program, 상기 마이크로프로세서 및 상기 하나 이상의 메모리 중 어느 하나에 상기 응용프로그램의 명령어 집합이 저장되고, The instruction set of the application program is stored in any one of the microprocessor and the one or more memories, 상기 마이크로프로세서 및 상기 하나 이상의 메모리 중 어느 하나에는, 상기 제1항 내지 제7항 중 어느 한 항의 방법을 수행하는 일련의 명령어 집합이 저장된 것을 특징으로 하는 응용프로그램 수행장치. Apparatus as claimed in claim 1, wherein at least one of the microprocessor and the one or more memories stores a set of instructions for performing the method of any one of claims 1 to 7.
KR10-2002-0037854A 2002-07-02 2002-07-02 Method for controlling memory data storage area, computer readable medium storing the method thereon, and application program executing device KR100497722B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-2002-0037854A KR100497722B1 (en) 2002-07-02 2002-07-02 Method for controlling memory data storage area, computer readable medium storing the method thereon, and application program executing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2002-0037854A KR100497722B1 (en) 2002-07-02 2002-07-02 Method for controlling memory data storage area, computer readable medium storing the method thereon, and application program executing device

Publications (2)

Publication Number Publication Date
KR20040003212A KR20040003212A (en) 2004-01-13
KR100497722B1 true KR100497722B1 (en) 2005-06-23

Family

ID=37314243

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2002-0037854A KR100497722B1 (en) 2002-07-02 2002-07-02 Method for controlling memory data storage area, computer readable medium storing the method thereon, and application program executing device

Country Status (1)

Country Link
KR (1) KR100497722B1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11110281A (en) * 1997-10-06 1999-04-23 Canon Inc Image forming device and memory management method
JPH11232162A (en) * 1998-02-19 1999-08-27 Fujitsu Ltd Garbage collection method
WO1999067699A2 (en) * 1998-06-25 1999-12-29 Koninklijke Philips Electronics N.V. Dynamic memory space allocation
JP2001101070A (en) * 1999-10-04 2001-04-13 Okuma Corp Method and device for managing memory
US6317756B1 (en) * 1998-10-07 2001-11-13 International Business Machines Corporation On-the-fly garbage collector

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11110281A (en) * 1997-10-06 1999-04-23 Canon Inc Image forming device and memory management method
JPH11232162A (en) * 1998-02-19 1999-08-27 Fujitsu Ltd Garbage collection method
WO1999067699A2 (en) * 1998-06-25 1999-12-29 Koninklijke Philips Electronics N.V. Dynamic memory space allocation
US6317756B1 (en) * 1998-10-07 2001-11-13 International Business Machines Corporation On-the-fly garbage collector
JP2001101070A (en) * 1999-10-04 2001-04-13 Okuma Corp Method and device for managing memory

Also Published As

Publication number Publication date
KR20040003212A (en) 2004-01-13

Similar Documents

Publication Publication Date Title
CN102436420B (en) The lasting key assignments of the low ram space of supplementary storage, high-throughput is used to store
US8453015B2 (en) Memory allocation for crash dump
CN102707966B (en) Method and device for acceleratively starting operating system, and method, device and terminal for generating prefetched information
CN100365577C (en) Persistent cache apparatus and methods
JP2009205254A (en) Computer, dumping program, and dumping method
CN104008061A (en) Internal memory recovery method and device
KR20000068817A (en) Memory management with compaction of data blocks
KR101651204B1 (en) Apparatus and Method for synchronization of snapshot image
US20180276120A1 (en) Manual memory management using lazy patching
US20080222198A1 (en) Data processing apparatus, method and computer program product for reducing memory usage of an object oriented program
US7020874B2 (en) Techniques for loading class files into virtual machines
CN114138193A (en) Data writing method, device and equipment for solid state disk with partitioned name space
US6959430B2 (en) Specialized heaps for creation of objects in object-oriented environments
US8176286B2 (en) Memory recycling in computer systems
US6799253B1 (en) Stochastic scratchpad storage management technique
US7096466B2 (en) Loading attribute for partial loading of class files into virtual machines
KR100497722B1 (en) Method for controlling memory data storage area, computer readable medium storing the method thereon, and application program executing device
US20030074364A1 (en) Compressed data structure and decompression system
US7036120B2 (en) Two tier clusters for representation of objects in Java programming environments
Chen et al. Refinery swap: An efficient swap mechanism for hybrid DRAM–NVM systems
CN114781322A (en) Memory state recovery method for MMU-free environment in CPU chip simulation acceleration
US11010070B2 (en) Methods for aligned, MPU region, and very small heap block allocations
US20050027954A1 (en) Method and apparatus to support the maintenance and reduction of FLASH utilization as it pertains to unused or infrequently referenced FLASH data
US6934726B2 (en) Storing and retrieving of field descriptors in Java computing environments
US20080034022A1 (en) System and method for updating references when incrementally compacting a heap

Legal Events

Date Code Title Description
A201 Request for examination
N231 Notification of change of applicant
N231 Notification of change of applicant
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20130611

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20140613

Year of fee payment: 10

FPAY Annual fee payment

Payment date: 20150602

Year of fee payment: 11

FPAY Annual fee payment

Payment date: 20160607

Year of fee payment: 12

LAPS Lapse due to unpaid annual fee