KR20050092639A - Memory management method for java virtual machine in mobile communication terminal - Google Patents

Memory management method for java virtual machine in mobile communication terminal Download PDF

Info

Publication number
KR20050092639A
KR20050092639A KR1020040017754A KR20040017754A KR20050092639A KR 20050092639 A KR20050092639 A KR 20050092639A KR 1020040017754 A KR1020040017754 A KR 1020040017754A KR 20040017754 A KR20040017754 A KR 20040017754A KR 20050092639 A KR20050092639 A KR 20050092639A
Authority
KR
South Korea
Prior art keywords
memory
area
java
virtual machine
node
Prior art date
Application number
KR1020040017754A
Other languages
Korean (ko)
Other versions
KR100595659B1 (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 KR1020040017754A priority Critical patent/KR100595659B1/en
Publication of KR20050092639A publication Critical patent/KR20050092639A/en
Application granted granted Critical
Publication of KR100595659B1 publication Critical patent/KR100595659B1/en

Links

Classifications

    • 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
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Stored Programmes (AREA)

Abstract

본 발명은 이동 통신 단말기에서 자바 가상 머신의 메모리 관리 방법에 관한 것으로, 종래 자바 가상 머신은 메모리를 회수하고 그대로 방치하므로 메모리를 비효율적으로 사용하고, 메모리 사용 유무를 판단하지 않고 메모리를 할당하므로 메모리 영역 사이에 겹침이 발생하여 이미지가 깨지는 문제점이 있었다. 이러한 문제점을 감안한 본 발명은 자바 가상 머신에서 자바 이미지 메모리 공동 영역을 소정 단위의 메모리 조각으로 나누는 단계와; 자바 애플리케이션이 메모리 할당을 요청하면 할당할 메모리 용량에 대한 메모리 조각의 정보를 계산하는 단계와; 연결 리스트에 새 노드를 생성하고 상기 계산한 메모리 조각의 정보를 저장하는 단계와; 자바 애플리케이션이 메모리를 반환하면 상기 연결 리스트에서 반환되는 메모리 조각의 할당 정보를 저장한 노드를 검색하여 해당 노드를 삭제하는 단계와; 상기 자바 애플리케이션으로부터 회수한 메모리 영역의 뒤에 사용 중인 메모리를 상기 회수한 메모리 영역에 복사하여 메모리 압축을 실행하는 단계로 이루어져 이미지 처리에 사용하는 메모리 공동 영역을 메모리 조각으로 나누어 메모리를 할당하고, 연결 리스트를 이용하여 사용 중인 메모리 영역과 가용 메모리 영역을 구분함으로써 새로 할당한 메모리 영역이 사용 중인 메모리 영역을 침범하지 않게 하는 효과가 있다.The present invention relates to a memory management method of a Java virtual machine in a mobile communication terminal. In the conventional Java virtual machine, since the memory is recovered and left as it is, memory is inefficiently used and memory is allocated without determining whether memory is used. There was a problem that the image is broken due to overlap between. In view of the above problems, the present invention includes the steps of: dividing a Java image memory common area into a predetermined piece of memory in a Java virtual machine; Calculating information of a memory fragment about a memory capacity to allocate when the Java application requests memory allocation; Creating a new node in a connection list and storing information of the calculated memory fragment; Searching for a node storing the allocation information of the memory fragment returned from the connection list and deleting the node when the Java application returns the memory; Copying the memory in use behind the memory area retrieved from the Java application to the retrieved memory area to perform memory compression, dividing the memory common area used for image processing into pieces of memory, and allocating memory; By using to distinguish between the memory area in use and the available memory area, there is an effect that the newly allocated memory area does not invade the memory area being used.

Description

이동 통신 단말기에서 자바 가상 머신의 메모리 관리 방법{MEMORY MANAGEMENT METHOD FOR JAVA VIRTUAL MACHINE IN MOBILE COMMUNICATION TERMINAL}MEMORY MANAGEMENT METHOD FOR JAVA VIRTUAL MACHINE IN MOBILE COMMUNICATION TERMINAL}

본 발명은 이동 통신 단말기에서 자바 가상 머신의 메모리 관리 방법에 관한 것으로, 특히 이미지 처리에 사용되는 메모리 공동 영역을 메모리 낭비 없이 효율적으로 사용할 수 있게 한 이동 통신 단말기에서 자바 가상 머신의 메모리 관리 방법에 관한 것이다.The present invention relates to a memory management method of a Java virtual machine in a mobile communication terminal, and more particularly, to a memory management method of a Java virtual machine in a mobile communication terminal that enables efficient use of a memory common area used for image processing without wasting memory. will be.

종래 이동 통신 단말기의 자바 가상 머신은 이미지 처리에 사용되는 메모리 공동 영역에서 소정 용량의 메모리를 자바 애플리케이션에 할당하고 할당한 메모리를 다시 회수한다. 자바 애플리케이션은 이미지를 처리하기 위해 자바 가상 머신에 메모리 할당을 요청한다. 자바 가상 머신은 자바 애플리케이션의 메모리 할당 요청에 응답하여 적정한 수준의 메모리를 할당한다. 자바 애플리케이션은 할당받은 메모리를 사용하여 이미지를 처리하고, 메모리 사용을 마치면 자바 가상 머신에 메모리 회수를 요청한다. 자바 가상 머신은 자바 애플리케이션이 사용한 메모리를 회수하여 이미지 처리에 사용되는 메모리 공동 영역을 관리한다.The Java virtual machine of a conventional mobile communication terminal allocates a predetermined amount of memory to a Java application in a memory common area used for image processing and reclaims the allocated memory. The Java application requests memory allocation from the Java virtual machine to process the image. The Java virtual machine allocates the appropriate level of memory in response to memory allocation requests from Java applications. The Java application uses the allocated memory to process the image, and when the memory is used, requests the Java virtual machine to reclaim the memory. The Java virtual machine reclaims the memory used by Java applications to manage the common areas of memory used for image processing.

도 1은 종래 자바 가상 머신이 이미지 처리에 사용되는 메모리 공동 영역을 관리하는 방법을 설명하는 예시도이다.1 is an exemplary diagram illustrating a method of managing a memory common area used for image processing by a conventional Java virtual machine.

자바 애플리케이션이 이미지 처리를 위해 메모리 할당을 요청하면 자바 가상 머신은 이미지 처리에 사용되는 메모리 공동 영역에서 처음부터 필요한 만큼의 소정 메모리 영역을 할당한다.When a Java application requests memory allocation for image processing, the Java virtual machine allocates as many memory areas as needed from the beginning in the common areas of memory used for image processing.

상기 자바 애플리케이션 또는 다른 자바 애플리케이션이 메모리 할당을 요청하면 자바 가상 머신은 처음 할당된 메모리 영역에 뒤이어 소정 메모리 영역을 할당하고 인덱스를 다음 메모리 어드레스로 저장한다.When the Java application or another Java application requests memory allocation, the Java virtual machine allocates a predetermined memory region following the first allocated memory region and stores the index to the next memory address.

또 다른 자바 애플리케이션이 메모리 할당을 요청하면 자바 가상 머신은 인덱스에 저장된 메모리 어드레스부터 시작하여 필요한 만큼 메모리를 할당하고 인덱스를 그 다음 메모리 어드레스로 변경한다.When another Java application requests memory allocation, the Java virtual machine allocates memory as needed, starting with the memory address stored in the index, and changes the index to the next memory address.

자바 애플리케이션에서 메모리 회수를 요청하면 자바 가상 머신은 메모리 공동 영역에서 사용되지 않는 메모리 영역을 해제한다. 메모리 공동 영역은 단편화되어 두 메모리 영역으로 나누어진다.When a Java application requests memory reclamation, the Java virtual machine frees up unused areas of memory in the memory common area. The memory common area is fragmented and divided into two memory areas.

자바 애플리케이션에서 메모리 할당을 요청하면 자바 가상 머신은 사용되지 않은 메모리 공동 영역에서 필요한 만큼의 메모리 영역을 확보하고자 한다. 이때, 더 이상 할당할 메모리 영역이 없으면 자바 가상 머신은 메모리 공동 영역의 처음부터 메모리를 할당한다. 따라서, 처음 메모리 영역이 이미 사용 중인 경우에는 이미지가 깨질 수 있다.When a Java application requests memory allocation, the Java virtual machine attempts to free up as much memory as it needs from the unused memory common area. If there is no more memory area to allocate, the Java virtual machine allocates memory from the beginning of the memory common area. Thus, if the first memory area is already in use, the image may be broken.

그러나, 상기와 같은 종래 기술에 있어서, 자바 가상 머신은 메모리를 회수하고 그대로 방치하므로 메모리를 비효율적으로 사용하고, 메모리 사용 유무를 판단하지 않고 메모리를 할당하므로 메모리 영역 사이에 겹침이 발생하여 이미지가 깨지는 문제점이 있다.However, in the prior art as described above, the Java virtual machine recovers the memory and leaves it as it is, so that the memory is inefficiently used and the memory is allocated without determining whether the memory is used. There is a problem.

따라서, 본 발명은 상기와 같은 문제점을 감안하여 창안한 것으로, 메모리 공동 영역을 메모리 조각으로 나누어 메모리를 할당하고, 회수한 메모리 영역에 사용 중인 메모리 영역을 옮겨 메모리를 압축 관리할 수 있도록 한 이동 통신 단말기에서 자바 가상 머신의 메모리 관리 방법을 제공함에 그 목적이 있다.Accordingly, the present invention has been made in view of the above problems, and the mobile communication is performed by dividing a memory common area into pieces of memory, allocating memory, and moving the memory area in use to the recovered memory area to compress and manage the memory. The purpose is to provide a memory management method of the Java virtual machine in the terminal.

상기와 같은 목적을 달성하기 위한 본 발명은, 자바 가상 머신에서 자바 이미지 메모리 공동 영역을 소정 단위의 메모리 조각으로 나누는 단계와; 자바 애플리케이션이 메모리 할당을 요청하면 할당할 메모리 용량에 대한 메모리 조각의 정보를 계산하는 단계와; 연결 리스트에 새 노드를 생성하고 상기 계산한 메모리 조각의 정보를 저장하는 단계와; 자바 애플리케이션이 메모리를 반환하면 상기 연결 리스트에서 반환되는 메모리 조각의 할당 정보를 저장한 노드를 검색하여 해당 노드를 삭제하는 단계와; 상기 자바 애플리케이션으로부터 회수한 메모리 영역의 뒤에 사용 중인 메모리를 상기 회수한 메모리 영역에 복사하여 메모리 압축을 실행하는 단계로 이루어진 것을 특징으로 한다.The present invention for achieving the above object comprises the steps of: dividing a Java image memory common area into a predetermined piece of memory in a Java virtual machine; Calculating information of a memory fragment about a memory capacity to allocate when the Java application requests memory allocation; Creating a new node in a connection list and storing information of the calculated memory fragment; Searching for a node storing the allocation information of the memory fragment returned from the connection list and deleting the node when the Java application returns the memory; And copying the memory in use behind the memory area recovered from the Java application to the recovered memory area to perform memory compression.

이하, 본 발명에 따른 실시 예를 첨부한 도면을 참조하여 상세히 설명하면 다음과 같다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

본 발명이 실시되는 이동 통신 단말기는 자바 이미지 처리에 사용되는 메모리 공동 영역을 포함하는 메모리와; 특정 이미지를 처리하는 작업을 수행하는 자바 애플리케이션과, 상기 메모리 공동 영역의 소정 메모리 영역을 상기 자바 애플리케이션의 이미지 처리에 필요한 메모리로 할당하고 사용된 메모리를 회수하는 자바 가상 머신을 수행하는 제어부로 구성된다.A mobile communication terminal in accordance with the present invention includes a memory including a memory common area used for processing Java images; A Java application that performs a task of processing a specific image, and a control unit that executes a Java virtual machine that allocates a predetermined memory area of the memory common area as a memory for image processing of the Java application and retrieves the used memory. .

메모리는 소정 영역을 자바 이미지 처리에 필요한 메모리 공동 영역으로 구분한다. 자바 가상 머신은 메모리 공동 영역을 자바 애플리케이션의 이미지 처리에 분배한다. 자바 애플리케이션은 분배받은 메모리 영역을 이미지 처리에 사용한다.The memory divides a predetermined area into memory common areas necessary for processing Java images. The Java virtual machine distributes memory common areas to image processing of Java applications. Java applications use the allocated memory area for image processing.

자바 애플리케이션은 이미지 처리를 마치고 불필요한 메모리 영역을 자바 가상 머신에 반환한다. 자바 가상 머신은 자바 애플리케이션으로부터 메모리를 회수하고 메모리 공동 영역에서 사용 중인 메모리 영역을 재배치하여 관리한다.The Java application finishes processing the image and returns the unnecessary memory area to the Java virtual machine. The Java virtual machine reclaims memory from Java applications and relocates and manages memory areas in use in memory common areas.

도 2는 본 발명의 실시 예에 따른 자바 가상 머신이 자바 이미지 처리에 할당한 메모리 공동 영역을 보인 예시도이다.2 is an exemplary diagram illustrating a memory common area allocated to a Java image processing by a Java virtual machine according to an exemplary embodiment of the present invention.

메모리 공동 영역은 메모리의 소정 영역을 차지한다. 자바 가상 머신은 자바 애플리케이션이 메모리 할당을 요청할 때 메모리 공동 영역을 분배하여 소정 메모리 영역을 할당한다.The memory common area occupies a predetermined area of memory. The Java virtual machine allocates certain memory areas by distributing memory common areas when a Java application requests memory allocation.

도 3은 도 2의 자바 이미지 처리에 할당된 메모리 공동 영역을 512Kbyte단위의 메모리 조각으로 나눈 예를 보인도이다.FIG. 3 is a diagram illustrating an example of dividing a memory common area allocated to Java image processing of FIG. 2 into memory fragments of 512 Kbyte units.

자바 가상 머신은 메모리 공동 영역을 512byte 단위의 메모리 조각으로 나눈다. 자바 가상 머신은 자바 애플리케이션에서 필요로 하는 메모리 용량에 맞게 메모리 조각을 소정 개로 묶어 메모리를 할당한다.The Java virtual machine divides the memory common area into 512-byte pieces of memory. The Java virtual machine allocates memory by grouping pieces of memory to fit the amount of memory required by Java applications.

도 4는 본 발명의 실시 예에 따른 자바 가상 머신이 메모리를 할당할 때 연결 리스트 및 노드 정보를 구성하는 예를 보인도이다.4 is a diagram illustrating an example of configuring a connection list and node information when the Java virtual machine allocates memory according to an embodiment of the present invention.

연결 리스트는 노드를 구성하여 메모리 공간 영역에서 사용 중인 메모리 영역에 대한 정보를 저장한다.The linked list configures nodes to store information about memory areas in use in the memory space area.

자바 가상 머신은 메모리 조각 단위로 메모리를 할당할 때마다 연결 리스트의 노드를 만들어 할당하는 메모리 조각 정보를 관리한다. 연결 리스트에는 메모리가 할당될 때마다 노드가 하나 추가된다. 노드는 할당되는 메모리 조각의 개수, 시작 어드레스 등을 저장한다.The Java virtual machine manages the memory fragment information that is allocated by creating nodes in the linked list whenever memory is allocated in units of memory fragments. A node is added to the connection list each time memory is allocated. The node stores the number of allocated pieces of memory, the start address, and the like.

메모리가 반환되면 자바 가상 머신은 회수한 메모리의 노드를 연결 리스트에서 삭제한다.When the memory is returned, the Java virtual machine deletes the retrieved memory node from the linked list.

도 5는 본 발명의 실시 예에 따른 자바 가상 머신이 메모리를 할당하고 해제하는 동작을 보인 예시도이다.5 is an exemplary diagram illustrating an operation of allocating and releasing memory by a Java virtual machine according to an exemplary embodiment of the present invention.

자바 가상 머신이 이미지 처리에 사용되는 메모리 공동 영역을 512byte 단위의 메모리 조각으로 나누고, 나누어진 메모리 조각을 연결 리스트를 이용해서 관리하는 방법을 예를 들어 설명하면 다음과 같다.An example of how the Java virtual machine divides the memory common area used for image processing into 512-byte pieces of memory and manages the divided pieces of memory using a linked list is as follows.

자바 가상 머신은 자바 애플리케이션의 이미지 처리에 사용되는 메모리 영역을 자바 이미지 메모리 공동 영역으로 정하고, 자바 이미지 메모리 공동 영역에 409,600byte(400KB)를 할당한다.The Java virtual machine designates a memory area used for image processing of a Java application as a Java image memory common area, and allocates 409,600 bytes (400 KB) to the Java image memory common area.

자바 가상 머신은 자바 이미지 메모리 공동 영역을 512byte 단위의 메모리 조각으로 나눈다. 409,600byte일 경우 자바 이미지 메모리 공동 영역은 800개의 메모리 조각으로 나누어진다.The Java virtual machine divides the Java image memory common area into 512-byte pieces of memory. At 409,600 bytes, the Java image memory common area is divided into 800 memory fragments.

자바 애플리케이션이 1200byte의 메모리 할당을 요청하면 자바 가상 머신은 1200byte를 512byte로 나누어 할당할 메모리 조각의 개수를 계산한다. 1200byte에는 3개의 메모리 조각이 필요하므로 자바 가상 머신은 연결 리스트에 노드 하나를 생성하고 이 노드에 메모리 조각의 개수의 값으로 3을, 할당한 메모리의 시작 어드레스의 값으로 0x0000을 저장한다.When a Java application requests 1200 bytes of memory allocation, the Java virtual machine divides 1200 bytes into 512 bytes to calculate the number of pieces of memory to allocate. Since 1200 bytes require three pieces of memory, the Java virtual machine creates one node in the linked list and stores 3 as the number of pieces of memory in this node and 0x0000 as the starting address of the allocated memory.

자바 애플리케이션이 1600byte의 메모리 할당을 요청하면 자바 가상 머신은 연결 리스트를 검색하여 마지막 노드에 저장된 시작 어드레스의 값과 메모리 조각의 개수를 이용하여 할당할 메모리의 시작 어드레스를 계산한다. 그리고, 자바 가상 머신은 1600byte를 512byte로 나누어 할당할 메모리 조각의 개수 4를 계산한다. 자바 가상 머신은 연결 리스트의 마지막 노드에 새로 노드 하나를 생성하여 첨부하고, 생성한 노드에 시작 어드레스의 값으로 0x0600를, 메모리 조각의 개수의 값으로 4를 저장한다.When a Java application requests 1600 bytes of memory allocation, the Java virtual machine retrieves the connection list and calculates the starting address of the memory to allocate using the value of the start address stored in the last node and the number of pieces of memory. The Java virtual machine divides 1600 bytes into 512 bytes and calculates the number of memory pieces 4 to be allocated. The Java virtual machine creates and attaches a new node to the last node of the linked list, and stores 0x0600 as the start address value and 4 as the number of memory fragments in the created node.

자바 애플리케이션이 다시 1700byte의 메모리 할당을 요청하면 자바 가상 머신은 상기에서 설명한 바와 같이, 마지막 노드의 정보를 참조하여 할당할 메모리의 시작 어드레스를 계산하고, 할당할 메모리 조각의 개수를 계산한다. 그리고, 자바 가상 머신은 새로 생성한 노드에 메모리 조각의 개수에 4를, 시작 어드레스에 0x0E00을 저장한다.When the Java application requests the memory allocation of 1700 bytes again, the Java virtual machine calculates the starting address of the memory to be allocated by referring to the information of the last node and calculates the number of memory fragments to be allocated as described above. The Java virtual machine stores 4 in the number of pieces of memory in the newly created node and 0x0E00 in the start address.

자바 애플리케이션이 두 번째 할당받았던 1600byte의 메모리를 반환하면 자바 가상 머신은 연결 리스트에서 반환되는 메모리의 할당 정보를 저장한 노드를 검색하여 해당 노드를 삭제한다. 삭제한 노드가 저장하고 있던 메모리 영역은 가용 공간으로 남게 된다.When the Java application returns 1600 bytes of memory that was allocated a second time, the Java virtual machine retrieves the node that stores the allocation information of the memory returned from the connection list and deletes the node. The memory area stored by the deleted node remains available.

자바 애플리케이션이 사용한 메모리를 반환할 때 반환되는 메모리의 할당 정보가 연결 리스트의 중간 노드에 위치한다고 가정하자. 자바 애플리케이션이 자바 이미지 메모리 공간 영역의 처음과 끝이 아닌 중간 영역을 반환하면 자바 이미지 메모리 공간 영역의 중간 영역이 가용 공간으로 남게 된다. 만약 중간 영역에 위치한 가용 공간의 메모리 용량이 자바 애플리케이션이 요청하는 메모리 용량보다 작으면, 자바 가상 머신은 중간 영역에 위치한 가용 공간의 메모리를 자바 애플리케이션에 다시 할당할 수 없다. 따라서, 자바 가상 머신은 자바 이미지 메모리 공동 영역의 사용 중인 메모리 영역을 재배치하여 빈 공간을 없애는 메모리 압축을 실행한다.Suppose that the memory allocation information returned by the Java application is located in the middle node of the linked list. If a Java application returns an intermediate region instead of the beginning and end of the Java image memory space region, the middle region of the Java image memory space region remains available. If the memory capacity of the available space located in the middle area is smaller than the memory capacity requested by the Java application, the Java virtual machine cannot reallocate the memory of the available space located in the middle area to the Java application. Thus, the Java virtual machine performs memory compression that relocates the active memory area of the Java image memory common area to eliminate free space.

자바 애플리케이션이 사용한 메모리 영역을 반환하면 자바 가상 머신은 상기 자바 애플리케이션으로부터 회수한 메모리 영역의 뒤에 사용 중인 메모리를 메모리 영역을 회수한 메모리 영역에 복사하여 메모리 압축을 실행한다. 그리고, 자바 가상 머신은 연결 리스트의 복사할 메모리 영역의 노드 정보 중 시작 어드레스의 값을 회수한 메모리 영역의 시작 어드레스의 값으로 변경한다. 예를 들어, 회수한 메모리 영역의 시작 어드레스의 값이 0x0600이고, 복사할 메모리 영역의 시작 어드레스의 값이 0x0E00이면 0x0E00을 0x0600으로 변경한다.When returning the memory area used by the Java application, the Java virtual machine performs memory compression by copying the memory in use behind the memory area recovered from the Java application to the memory area from which the memory area is recovered. The Java virtual machine changes the value of the start address of the node information of the memory area to be copied in the connection list to the value of the start address of the retrieved memory area. For example, if the value of the start address of the retrieved memory area is 0x0600 and the value of the start address of the memory area to be copied is 0x0E00, 0x0E00 is changed to 0x0600.

복사할 메모리 영역이 다수일 때는 자바 가상 머신은 처음에 위치하는 복사할 메모리 영역의 시작 어드레스의 값에서 회수한 메모리 영역의 시작 어드레스의 값을 빼서 두 시작 어드레스의 차를 구한다. 그리고, 자바 가상 머신은 각각의 복사할 메모리 영역의 시작 어드레스의 값에서 상기 두 시작 어드레스의 차를 빼서 시작 어드레스의 값을 변경한다.When there are multiple memory areas to copy, the Java virtual machine calculates the difference between the two start addresses by subtracting the value of the start address of the retrieved memory area from the value of the start address of the memory area to be copied first. The Java virtual machine changes the value of the start address by subtracting the difference between the two start addresses from the value of the start address of each memory area to be copied.

이상에서 상세히 설명한 바와 같이, 본 발명은 이미지 처리에 사용하는 메모리 공동 영역을 메모리 조각으로 나누어 메모리를 할당하고, 연결 리스트를 이용하여 사용 중인 메모리 영역과 가용 메모리 영역을 구분함으로써 새로 할당한 메모리 영역이 사용 중인 메모리 영역을 침범하지 않게 하는 효과가 있다.As described in detail above, the present invention divides a memory common area used for image processing into memory fragments and allocates memory, and uses a linked list to classify the memory area being used and the available memory area, thereby providing a newly allocated memory area. It has the effect of not invading the memory area in use.

또한, 메모리를 회수하면 메모리를 압축하여 빈 공간을 없앰으로써 메모리 영역을 낭비 없이 효율적으로 사용하는 효과가 있다.In addition, when the memory is recovered, the memory is compressed to eliminate empty space, thereby effectively using the memory area without waste.

도 1은 종래 자바 가상 머신이 이미지 처리에 사용되는 메모리 공동 영역을 관리하는 방법을 설명하는 예시도.1 is an exemplary diagram illustrating a method for managing a memory common area used for image processing by a conventional Java virtual machine.

도 2는 본 발명의 실시 예에 따른 자바 가상 머신이 자바 이미지 처리에 할당한 메모리 공동 영역을 보인 예시도.2 is an exemplary view showing a memory common area allocated to Java image processing by a Java virtual machine according to an embodiment of the present invention.

도 3은 도 2의 자바 이미지 처리에 할당된 메모리 공동 영역을 512Kbyte단위의 메모리 조각으로 나눈 예를 보인도.3 is a diagram illustrating an example of dividing a memory common area allocated to Java image processing of FIG. 2 into memory fragments of 512 Kbytes;

도 4는 본 발명의 실시 예에 따른 자바 가상 머신이 메모리를 할당할 때 연결 리스트 및 노드 정보를 구성하는 예를 보인도.4 illustrates an example of configuring a connection list and node information when a Java virtual machine allocates memory according to an embodiment of the present invention.

도 5는 본 발명의 실시 예에 따른 자바 가상 머신이 메모리를 할당하고 해제하는 동작을 보인 예시도.5 is an exemplary diagram illustrating an operation of allocating and releasing memory by a Java virtual machine according to an exemplary embodiment of the present invention.

Claims (3)

자바 가상 머신에서 자바 이미지 메모리 공동 영역을 소정 단위의 메모리 조각으로 나누는 단계와; 자바 애플리케이션이 메모리 할당을 요청하면 할당할 메모리 용량에 대한 메모리 조각의 정보를 계산하는 단계와; 연결 리스트에 새 노드를 생성하고 상기 계산한 메모리 조각의 정보를 저장하는 단계와; 자바 애플리케이션이 메모리를 반환하면 상기 연결 리스트에서 반환되는 메모리 조각의 할당 정보를 저장한 노드를 검색하여 해당 노드를 삭제하는 단계와; 상기 자바 애플리케이션으로부터 회수한 메모리 영역의 뒤에 사용 중인 메모리를 상기 회수한 메모리 영역에 복사하여 메모리 압축을 실행하는 단계로 이루어진 것을 특징으로 하는 이동 통신 단말기에서 자바 가상 머신의 메모리 관리 방법.Dividing a Java image memory common area into a predetermined unit of memory in a Java virtual machine; Calculating information of a memory fragment about a memory capacity to allocate when the Java application requests memory allocation; Creating a new node in a connection list and storing information of the calculated memory fragment; Searching for a node storing the allocation information of the memory fragment returned from the connection list and deleting the node when the Java application returns the memory; Copying the memory in use behind the memory area recovered from the Java application to the recovered memory area to perform memory compression. 제1항에 있어서, 상기 메모리 조각의 정보 계산은 자바 애플리케이션이 요청한 메모리 용량을 메모리 조각의 용량으로 나누어 메모리 조각의 개수를 계산하는 단계와; 연결 리스트의 마지막 노드에 저장된 메모리 조각의 개수와 메모리 조각의 용량을 곱하여 얻은 어드레스 오프셋을 마지막 노드의 시작 어드레스에 더해 할당할 메모리의 시작 어드레스를 계산하는 단계로 이루어진 것을 특징으로 하는 이동 통신 단말기에서 자바 가상 머신의 메모리 관리 방법.The method of claim 1, wherein the calculating of the memory fragment information comprises: calculating a number of memory fragments by dividing a memory capacity requested by a Java application by a memory fragment; Calculating a start address of a memory to be allocated by adding an address offset obtained by multiplying the number of pieces of memory stored in the last node of the connection list and the capacity of the pieces of memory to the start address of the last node; How memory is managed in a virtual machine. 제1항에 있어서, 상기 메모리 압축은 회수한 메모리 영역의 뒤에 위치하는 사용 중인 메모리를 상기 회수한 메모리 영역에 복사하는 단계와; 처음에 위치하는 복사할 메모리 영역의 시작 어드레스의 값에서 회수한 메모리 영역의 시작 어드레스의 값을 빼서 두 시작 어드레스의 차를 구하는 단계와; 각각의 복사할 메모리 영역의 시작 어드레스의 값에서 상기 두 시작 어드레스의 차를 빼서 시작 어드레스의 값을 변경하는 단계로 이루어진 것을 특징으로 하는 이동 통신 단말기에서 자바 가상 머신의 메모리 관리 방법.2. The method of claim 1, wherein the memory compression comprises: copying an in-use memory located behind the recovered memory area to the recovered memory area; Obtaining a difference between two start addresses by subtracting the value of the start address of the retrieved memory area from the value of the start address of the memory area to be copied initially; And changing the value of the start address by subtracting the difference between the two start addresses from the value of the start address of each memory area to be copied.
KR1020040017754A 2004-03-16 2004-03-16 Memory management method for java virtual machine in mobile communication terminal KR100595659B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020040017754A KR100595659B1 (en) 2004-03-16 2004-03-16 Memory management method for java virtual machine in mobile communication terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020040017754A KR100595659B1 (en) 2004-03-16 2004-03-16 Memory management method for java virtual machine in mobile communication terminal

Publications (2)

Publication Number Publication Date
KR20050092639A true KR20050092639A (en) 2005-09-22
KR100595659B1 KR100595659B1 (en) 2006-07-03

Family

ID=37273903

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020040017754A KR100595659B1 (en) 2004-03-16 2004-03-16 Memory management method for java virtual machine in mobile communication terminal

Country Status (1)

Country Link
KR (1) KR100595659B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100753805B1 (en) * 2006-07-18 2007-08-31 삼성전자주식회사 Apparatus and method for obtaing application list in portable communication system
CN112433809A (en) * 2020-11-05 2021-03-02 北京浪潮数据技术有限公司 JVM memory management method, device, equipment and readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100624863B1 (en) * 1999-12-21 2006-09-14 엘지전자 주식회사 Method for effectively using memory in mobile station

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100753805B1 (en) * 2006-07-18 2007-08-31 삼성전자주식회사 Apparatus and method for obtaing application list in portable communication system
CN112433809A (en) * 2020-11-05 2021-03-02 北京浪潮数据技术有限公司 JVM memory management method, device, equipment and readable storage medium
CN112433809B (en) * 2020-11-05 2023-12-22 北京浪潮数据技术有限公司 JVM memory management method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
KR100595659B1 (en) 2006-07-03

Similar Documents

Publication Publication Date Title
TWI805323B (en) Storage device
CN109725847B (en) Memory system and control method
CN110678836B (en) Persistent memory for key value storage
CN114115747B (en) Memory system and control method
JP6785205B2 (en) Memory system and control method
KR100874702B1 (en) Device Drivers and Methods for Efficiently Managing Flash Memory File Systems
US8250333B2 (en) Mapping address table maintenance in a memory device
JP6785204B2 (en) Memory system and control method
JP2019008729A (en) Memory system and control method
CN102289409B (en) The memory allocator of layered scalable
CN109814805B (en) Stripe reorganization method in storage system and stripe server
JP7013546B2 (en) Memory system
KR100595659B1 (en) Memory management method for java virtual machine in mobile communication terminal
US10949340B2 (en) Block mapping systems and methods for storage device
JP6652605B2 (en) Memory system control method
CN110199265B (en) Storage device and storage area management method
JP6430039B2 (en) Storage device and storage device control method
US9753850B1 (en) On-heap huge slab allocator
JP7102482B2 (en) Memory system and control method
JP2022036263A (en) Control method
JP2022019787A (en) Memory system and control method
CN117667764A (en) Memory management method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20130514

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20140523

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20150522

Year of fee payment: 10

FPAY Annual fee payment

Payment date: 20160524

Year of fee payment: 11

LAPS Lapse due to unpaid annual fee