KR102012261B1 - Memory Management Apparatus and Method for Supporting Partial Release of Memory Allocation - Google Patents

Memory Management Apparatus and Method for Supporting Partial Release of Memory Allocation Download PDF

Info

Publication number
KR102012261B1
KR102012261B1 KR1020150029836A KR20150029836A KR102012261B1 KR 102012261 B1 KR102012261 B1 KR 102012261B1 KR 1020150029836 A KR1020150029836 A KR 1020150029836A KR 20150029836 A KR20150029836 A KR 20150029836A KR 102012261 B1 KR102012261 B1 KR 102012261B1
Authority
KR
South Korea
Prior art keywords
memory
release
packet
pointer
size
Prior art date
Application number
KR1020150029836A
Other languages
Korean (ko)
Other versions
KR20160106999A (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 KR1020150029836A priority Critical patent/KR102012261B1/en
Publication of KR20160106999A publication Critical patent/KR20160106999A/en
Application granted granted Critical
Publication of KR102012261B1 publication Critical patent/KR102012261B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9005Buffering arrangements using dynamic buffer space allocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9021Plurality of buffers per packet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9042Separate storage for different parts of the packet, e.g. header and payload

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

본 발명은 통신 시스템 등에서 프로토콜 계층간 데이터 전달을 위해 사용되는 메모리를 각각의 계층에서 일정 패킷 크기로 분할 할당하고 해제하는 방식에서, 프로토콜 계층을 거치면서 분할된 메모리를 부분적으로 해제할 수 있는 메모리 관리 장치 및 방법에 관한 것이다. According to the present invention, in a method of dividing and releasing memory used for data transfer between protocol layers in a communication system in a predetermined packet size in each layer, memory management capable of partially releasing the divided memory through the protocol layer An apparatus and method are provided.

Description

메모리 할당의 부분 해제를 지원하는 메모리 관리 장치 및 방법{Memory Management Apparatus and Method for Supporting Partial Release of Memory Allocation}Memory Management Apparatus and Method for Supporting Partial Release of Memory Allocation

본 발명은 메모리 관리 장치 및 방법에 관한 것으로서, 특히, 통신 시스템 등에서 메모리를 일정 패킷 크기로 할당하고 해제하는 방식에서, 해제 시 메모리를 부분적으로 해제하기 위한 메모리 관리 장치 및 방법에 관한 것이다. The present invention relates to a memory management apparatus and method, and more particularly, to a memory management apparatus and method for partially releasing a memory upon release in a manner of allocating and releasing a memory to a predetermined packet size in a communication system or the like.

통신 시스템에서는 통신 프로토콜을 지원하기 위해 여러 계층으로 프로토콜이 나뉘어져 있다. 예를 들어, 이동통신 시스템에서는 망에서 받은 IP 데이터를 PDCP(Packet Data Convergence Protocol)를 처리한 후 전송을 하기 위해 RLC (Radio Link Control), MAC(Media Access Control) 계층을 거쳐 모뎀 계층으로 전달하는 프로토콜을 수행하게 된다. 이러한 프로토콜들은 각각의 메모리를 사용하여 이루어진다.In a communication system, protocols are divided into layers to support communication protocols. For example, in a mobile communication system, IP data received from a network is processed through a Packet Data Convergence Protocol (PDCP) and then transmitted to a modem layer through a Radio Link Control (RLC) and a Media Access Control (MAC) layer for transmission. Perform the protocol. These protocols are made using individual memories.

IP 데이터는 계층을 이동할 때마다 해당 계층에서 데이터를 분할 및 조립하기 위한 메모리 관리 방식으로 이루어진다. 데이터 분할 시 물리적으로 분할된 데이터를 다른 메모리에 복사하여 조립하는 방식으로 수행할 수 있으나, 이러한 복사 방식은 고속화되는 통신 시스템에서 매우 큰 프로세싱 오버헤드를 주며 시스템의 성능을 현격히 저하시키는 요인이 된다. 성능 향상을 위해 이러한 분할 데이터를 메모리에 복사하지 않고 분할 정보만을 이용하여 계층간 전달하게 하는 무복사(zero copy) 시스템을 지향하고 있다.Whenever data is moved between layers, IP data is managed in a memory management manner to divide and assemble data in the layer. Although data partitioning may be performed by copying physically partitioned data to another memory and assembling it, such copying method may cause a very large processing overhead in a high-speed communication system and may significantly reduce the performance of the system. In order to improve performance, the present invention aims at a zero copy system that transfers the divided data using only the partition information without copying it to memory.

그러나, 무복사 시스템에서는 메모리 관리에 문제점이 있다. 예를 들어, 위와 같은 예에서 PDCP에서 IP 데이터를 저장하기 위해 메모리 관리자에서 할당받은 메모리는 각 프로토콜 계층을 지나면서 분할될 수 있다. 즉, 최상위 계층(예, PDCP)에서 할당받은 주 메모리는 계층 이동 시 분할되어 RLC 계층 등에서는 여러 개의 데이터 메모리로 분할되어 관리된다. 이러한 경우 일반적으로 메모리 관리자는, PDCP에서 할당받은 메모리를 해제하기 위해서 할당받은 주 메모리의 주소, 즉, 포인터(pointer)를 해제 시에 요구하게 된다. 그러나, 계층을 거치면서 분할된 부 메모리 포인터와 크기만을 관리하게 되므로 이러한 프로토콜에서는 최상위 계층에서 할당받은 주 메모리 포인터에 대한 정보를 관리하기 어려울 뿐만 아니라, 각 계층에서 분할된 데이터들이 해제되는 시점과 해제하는 주체가 다를 수 있으므로 분할된 메모리 전체에 대하여 해제관련 정보를 전체적으로 관리하기 것이 매우 어렵다는 단점이 있다.However, there is a problem in memory management in a copyless system. For example, in the above example, the memory allocated by the memory manager to store IP data in the PDCP may be partitioned through each protocol layer. That is, the main memory allocated in the uppermost layer (eg PDCP) is divided when the layer is moved, and is divided and managed in a plurality of data memories in the RLC layer. In this case, the memory manager generally requires the address of the allocated main memory, that is, the pointer, to release the allocated memory in the PDCP. However, since only the sub-memory pointers and sizes divided through the hierarchy are managed, not only is it difficult to manage information about the main memory pointers allocated in the top layer, but also when and when the divided data is released in each layer. Since the subjects can be different, it is very difficult to manage the release-related information as a whole.

따라서, 본 발명은 상술한 문제점을 해결하기 위하여 안출된 것으로, 본 발명의 목적은, 통신 시스템 등에서 프로토콜 계층간 데이터 전달을 위해 사용되는 메모리를 각각의 계층에서 일정 패킷 크기로 분할 할당하고 해제하는 방식에서, 프로토콜 계층을 거치면서 분할된 메모리를 부분적으로 해제할 수 있는 메모리 관리 장치 및 방법을 제공하는 데 있다. Accordingly, the present invention has been made to solve the above-described problem, and an object of the present invention is to divide and allocate a memory used for data transfer between protocol layers in a communication system or the like to a predetermined packet size in each layer. The present invention provides a memory management apparatus and method capable of partially releasing partitioned memory while passing through a protocol layer.

먼저, 본 발명의 특징을 요약하면, 상기의 목적을 달성하기 위한 본 발명의 일면에 따른 메모리 할당의 부분 해제를 지원하는 메모리 관리 장치는, 패킷 인덱스로 구분되는 헤더와 데이터 영역에 데이터 패킷의 헤더 정보와 데이터를 각각 저장하는 패킷 저장 메모리; 상기 패킷 저장 메모리 할당이 부분 해제된 해당 포인터와 상기 패킷 인덱스를 관리하기 위한 해제 관리 메모리; 및 상기 패킷 저장 메모리의 할당에 있어서 상기 데이터 패킷의 크기와 태그 정보를 상기 헤더 정보로서 저장하여 관리하고 상기 데이터 패킷의 데이터를 상기 데이터 영역에 저장하여 관리하며, 상기 할당의 해제 요청에 따른 해당 해제 대상 포인터와 해제 대상 크기를 이용하여, 상기 해제 대상 포인터 앞이 상기 태그 정보인지 여부와 상기 해제 대상 크기가 상기 데이터 패킷의 크기와 일치 여부를 판단해 부분 해제인지 여부를 결정하는 메모리 관리자를 포함하고, 상기 메모리 관리자는, 상기 부분 해제에 있어서, 상기 해제 대상 포인터가 상기 해제 관리 메모리에 존재 여부에 따라 중복 해제 여부를 검사하여, 상기 중복 해제에 해당하지 않으면, 상기 해제 대상 포인터와 함께 그에 대응된 상기 패킷 인덱스를 상기 해제 관리 메모리에 관리한다.First, to summarize the features of the present invention, a memory management apparatus for supporting partial release of memory allocation according to an aspect of the present invention for achieving the above object, the header of the data packet in the header and data area divided by the packet index A packet storage memory for storing information and data, respectively; A release management memory for managing the pointer and the packet index from which the packet storage memory allocation is partially released; And storing and managing the size and tag information of the data packet as the header information in the allocation of the packet storage memory, and storing and managing the data of the data packet in the data area, and corresponding release according to the release request of the allocation. And a memory manager for determining whether the release target pointer is the tag information and whether the release target size coincides with the size of the data packet by using a target pointer and the release target size. The memory manager checks whether the release target pointer is de-duplicated according to whether or not the release target pointer exists in the release management memory. The packet index is managed in the release management memory.

상기 메모리 관리자는, 상기 해제 대상 포인터(p)에 대하여 하기의 수학식을 이용하여 상기 패킷 인덱스(i)를 계산하며,The memory manager calculates the packet index i with respect to the release target pointer p using the following equation,

i = FLOOR( ( p - BASE_ADDRESS ) / ( MM1_S + DATA_S) )i = FLOOR ((p-BASE_ADDRESS) / (MM1_S + DATA_S))

여기서, FLOOR(k)는 k보다 크지 않은 최대 정수값, BASE_ADDRESS는 상기 패킷 저장 메모리의 기준 주소, MM1_S는 상기 헤더의 크기, DATA_S는 상기 데이터 영역의 크기이다. Here, FLOOR (k) is a maximum integer value not greater than k, BASE_ADDRESS is a reference address of the packet storage memory, MM1_S is the size of the header, and DATA_S is the size of the data area.

상기 메모리 관리자는, 상기 중복 해제에 해당하지 않으면, 상기 헤더 정보의 상기 데이터 패킷의 크기에서 상기 해제 대상 크기를 뺀값으로 상기 데이터 패킷의 크기를 갱신하며, 갱신된 상기 데이터 패킷의 크기가 0이 아니라면, 상기 해제 대상 포인터와 함께 그에 대응된 상기 패킷 인덱스를 상기 해제 관리 메모리에 저장하여 관리한다. The memory manager updates the size of the data packet by subtracting the size of the release target from the size of the data packet of the header information, if it does not correspond to the deduplication, and if the size of the updated data packet is not 0 And stores the packet index corresponding to the release target pointer in the release management memory.

상기 해제 관리 메모리는, 상기 부분 해제된 해당 포인터와 상기 패킷 인덱스를 관리하기 위한 포인터 저장 메모리와 보조 메모리를 포함하며, 상기 메모리 관리자는, 상기 포인터 저장 메모리의 상기 패킷 인덱스에 대응된 저장소에 상기 해제 대상 포인터를 저장하며, 상기 포인터 저장 메모리의 상기 패킷 인덱스에 대응된 스택 포인터 각각이 소정의 최대값에 이르면 상기 해제 대상 포인터와 그에 대응된 상기 패킷 인덱스를 상기 보조 메모리의 스택 포인터로 구분된 저장소에 저장하여 관리한다. The release management memory includes a pointer storage memory and an auxiliary memory for managing the partially released corresponding pointer, the packet index, and the memory manager is configured to release the stored data in a storage corresponding to the packet index of the pointer storage memory. A target pointer, and when the stack pointer corresponding to the packet index of the pointer storage memory reaches a predetermined maximum value, the release target pointer and the packet index corresponding thereto are stored in a storage divided by the stack pointer of the auxiliary memory. Store and manage.

이에 따라 상기 포인터 저장 메모리의 저장소 크기가 소정의 크기로 제한되지만 상기 패킷 인덱스를 이용한 빠른 검색을 지원하고, 상기 보조 메모리는 상기 패킷 인덱스의 구분없이 사용되어 메모리가 절약되도록 지원한다.Accordingly, although the storage size of the pointer storage memory is limited to a predetermined size, it supports fast retrieval using the packet index, and the auxiliary memory is used without distinguishing the packet index to save memory.

그리고, 본 발명의 다른 일면에 따른 메모리 관리 장치에서 메모리 할당의 부분 해제를 지원하는 메모리 관리 방법은, 패킷 저장 메모리의 할당에 있어서, 헤더에 상기 데이터 패킷의 크기와 태그 정보를 헤더 정보로서 저장하여 관리하고, 데이터 영역에 상기 데이터 패킷의 데이터를 저장하여 관리하는 단계; 상기 할당의 해제 요청에 따른 해당 해제 대상 포인터와 해제 대상 크기를 이용하여, 상기 해제 대상 포인터 앞이 상기 태그 정보인지 여부와 상기 해제 대상 크기가 상기 데이터 패킷의 크기와 일치 여부를 판단해 부분 해제인지 여부를 결정하는 단계; 및 상기 메모리 관리자는, 상기 부분 해제에 있어서, 상기 해제 대상 포인터가 상기 해제 관리 메모리에 존재 여부에 따라 중복 해제 여부를 검사하여, 상기 중복 해제에 해당하지 않으면, 상기 해제 대상 포인터와 함께 그에 대응된 상기 패킷 인덱스를 상기 해제 관리 메모리에 관리하는 단계를 포함한다.According to another aspect of the present invention, there is provided a memory management method for supporting partial release of memory allocation in a memory management apparatus. In the allocation of packet storage memory, the size and tag information of the data packet are stored in a header as header information. Managing and storing data of the data packet in a data area; Whether or not the release target pointer is the tag information and whether the release target size coincides with the size of the data packet using the release target pointer and release target size according to the allocation release request are partial releases. Determining whether or not; And the memory manager, in the partial release, checks whether the release target pointer is de-duplicated according to whether or not the release target pointer exists in the release management memory. Managing the packet index in the release management memory.

본 발명에 따른 메모리 관리 장치 및 방법에 따르면, 통신 시스템 등에서 프로토콜 계층간 데이터 전달을 위해 사용되는 메모리를 각각의 계층에서 할당하고 해제 시에, 메모리 할당 방식에 있어서 일정크기의 패킷 메모리를 사용하는 경우 패킷 메모리를 부분적으로 해제 가능하도록 함으로써, 통신 계층간 이동하는 데이터가 분할되더라도 메모리 무복사 시스템을 원활히 구성하여 시스템의 성능을 높일 수 있다.According to the memory management apparatus and method according to the present invention, in the case of allocating and releasing memory used for data transfer between protocol layers in a communication system or the like, when using a predetermined size of packet memory in the memory allocation scheme By partially releasing the packet memory, even if the data moving between the communication layers is divided, it is possible to smoothly configure the memory copyless system to increase the performance of the system.

도 1은 본 발명의 일 실시예에 따른 메모리 할당의 부분 해제를 지원하는 메모리 관리 장치를 설명하기 위한 도면이다.
도 2는 본 발명의 메모리 할당의 부분 해제에 대한 일례를 설명하기 위한 도면이다.
도 3은 본 발명의 일 실시예에 따른 메모리 할당의 부분 해제를 지원하는 메모리 관리 장치의 동작을 설명하기 위한 흐름도이다.
FIG. 1 is a diagram illustrating a memory management apparatus supporting partial release of memory allocation according to an embodiment of the present invention.
2 is a diagram for explaining an example of partial release of memory allocation of the present invention.
3 is a flowchart illustrating an operation of a memory management apparatus supporting partial release of memory allocation according to an embodiment of the present invention.

이하에서는 첨부된 도면들을 참조하여 본 발명에 대해서 자세히 설명한다. 이때, 각각의 도면에서 동일한 구성 요소는 가능한 동일한 부호로 나타낸다. 또한, 이미 공지된 기능 및/또는 구성에 대한 상세한 설명은 생략한다. 이하에 개시된 내용은, 다양한 실시 예에 따른 동작을 이해하는데 필요한 부분을 중점적으로 설명하며, 그 설명의 요지를 흐릴 수 있는 요소들에 대한 설명은 생략한다. 또한 도면의 일부 구성요소는 과장되거나 생략되거나 또는 개략적으로 도시될 수 있다. 각 구성요소의 크기는 실제 크기를 전적으로 반영하는 것이 아니며, 따라서 각각의 도면에 그려진 구성요소들의 상대적인 크기나 간격에 의해 여기에 기재되는 내용들이 제한되는 것은 아니다.Hereinafter, with reference to the accompanying drawings will be described in detail with respect to the present invention. In this case, the same components in each drawing are represented by the same reference numerals as much as possible. In addition, detailed descriptions of already known functions and / or configurations are omitted. The following description focuses on parts necessary for understanding the operation according to various embodiments, and descriptions of elements that may obscure the gist of the description are omitted. In addition, some components of the drawings may be exaggerated, omitted, or schematically illustrated. The size of each component does not entirely reflect the actual size, and thus the contents described herein are not limited by the relative size or spacing of the components drawn in the respective drawings.

도 1은 본 발명의 일 실시예에 따른 메모리 할당의 부분 해제를 지원하는 메모리 관리 장치(100)를 설명하기 위한 도면이다.FIG. 1 is a diagram for describing a memory management apparatus 100 supporting partial release of memory allocation according to an embodiment of the present invention.

도 1을 참조하면, 본 발명의 일 실시예에 따른 메모리 관리 장치(100)는, 패킷 저장 메모리(110), 포인터 저장 메모리(121)와 보조 메모리(122)를 포함하는 해제 관리 메모리(120), 및 메모리 관리자(130)를 포함한다.Referring to FIG. 1, the memory management apparatus 100 according to an exemplary embodiment of the present disclosure may include a release management memory 120 including a packet storage memory 110, a pointer storage memory 121, and an auxiliary memory 122. , And memory manager 130.

메모리 관리자(130)는 메모리 관리 장치(100)에서의 IP(Internet Protocol) 데이터 패킷의 저장을 위한 메모리 할당과 해제 등에 관련된 전반적인 제어와 관리를 담당한다. The memory manager 130 is in charge of overall control and management related to memory allocation and release for storing IP (Internet Protocol) data packets in the memory management apparatus 100.

메모리 관리자(130)는 패킷 저장 메모리(110)의 저장소를 할당하여, 이동통신 시스템, 인터넷 시스템 등 통신 시스템 등에서 PDCP(Packet Data Convergence Protocol), RLC (Radio Link Control), MAC(Media Access Control), 모뎀(물리 계층) 등 다수의 신호 처리 계층 각각에서 처리되는 IP 데이터 패킷을 저장할 수 있다.The memory manager 130 allocates a storage of the packet storage memory 110, and may use a packet data convergence protocol (PDCP), a radio link control (RLC), a media access control (MAC), a mobile communication system, an internet system, and the like. An IP data packet processed by each of a plurality of signal processing layers such as a modem (physical layer) can be stored.

패킷 저장 메모리(110)는 기준 주소(base address)로부터 소정의 크기(바이트)의 저장소로 이루어지며, 소정의 개수 PN(자연수) 개의 분할된 저장소로 관리되어 각각의 분할된 저장소에 데이터 패킷이 저장될 수 있다. 각각의 분할된 저장소는, 해당 패킷의 데이터 크기, 소정의 태그(TAG) 정보 등 헤더 정보를 저장하는 헤더 MM1[i] 및 해당 패킷의 데이터를 저장하는 데이터 영역을 포함하고, 인덱스 i(i=0~PN-1)로 데이터 패킷의 저장 위치를 구분할 수 있고 인덱스 i 값은 해당 패킷의 ID(식별자)에 해당한다. 각각의 분할된 저장소의 헤더 MM1[i]와 데이터 영역은 각각 MM1_S(자연수) 및 DATA_S(자연수)의 크기(바이트)를 가지는 것으로 가정한다.The packet storage memory 110 consists of a storage of a predetermined size (byte) from a base address, and is managed as a predetermined number of divided storages of PNs (natural numbers) so that data packets are stored in each divided storage. Can be. Each partitioned storage includes a header MM1 [i] for storing header information such as data size of the packet, predetermined tag (TAG) information, and a data area for storing data of the packet, and index i (i = 0 ~ PN-1) can be used to distinguish the storage location of the data packet, and the index i value corresponds to the ID (identifier) of the packet. It is assumed that the header MM1 [i] and the data area of each partitioned storage have sizes (bytes) of MM1_S (natural number) and DATA_S (natural number), respectively.

해제 관리 메모리(120)의 포인터 저장 메모리(121)와 보조 메모리(122)는 메모리 해제를 관리하기 위한 저장소이다. 보조 메모리(122)는 포인터 저장 메모리(121)의 저장소 부족 시에 사용을 위한 보조 저장소로서, 모든 패킷들 각각에 대한 정보를 포인터 구분자 MM3.p 및 패킷 인덱스 구분자 MM3.i로 구분하여 저장한다. 보조 메모리(122)에는 모든 패킷에 대한 정보를 저장할 수 있지만, 포인터 저장 메모리(121)에 비교하여 검색이 느릴 수 있다. 다만, 보조 메모리(122)는 모든 패킷들이 공용으로 사용할 수 있어 메모리를 절약할 수 있는 장점이 있다.The pointer storage memory 121 and the auxiliary memory 122 of the release management memory 120 are storages for managing memory release. The auxiliary memory 122 is an auxiliary storage for use when the storage of the pointer storage memory 121 is insufficient. The auxiliary memory 122 divides and stores information about each packet into a pointer delimiter MM3.p and a packet index delimiter MM3.i. The auxiliary memory 122 may store information on all packets, but the search may be slow compared to the pointer storage memory 121. However, the auxiliary memory 122 has an advantage of saving memory because all packets can be used in common.

메모리 관리자(130)는 각 계층에서의 소정의 프로세서로부터 메모리 할당 요청을 받으면, 패킷 저장 메모리(110)의 PN개의 패킷 저장소 중에 사용 가능한 위치를 선정하고 해당 패킷의 데이터 영역의 시작 주소인 포인터를 리턴한다. 또한, 메모리 관리자(130)는 할당 해제 시에는, 기 할당했던 포인터를 전달받아 해당 패킷을 해제한다. 이러한 방식은 일반적인 통신 시스템에서 사용하는 방식으로서, 본 발명에서는 메모리 관리자(130)에서의 메모리 할당과 해제에 관한 다양한 구체적인 방식이 적용될 수 있다. When the memory manager 130 receives a memory allocation request from a predetermined processor in each layer, the memory manager 130 selects an available position among the PN packet stores of the packet storage memory 110 and returns a pointer that is a start address of the data area of the packet. do. In addition, when de-allocation, the memory manager 130 receives the pre-allocated pointer and releases the packet. This method is used in a general communication system. In the present invention, various specific methods related to memory allocation and release in the memory manager 130 may be applied.

도 2는 본 발명의 메모리 할당의 부분 해제에 대한 일례를 설명하기 위한 도면이다.2 is a diagram for explaining an example of partial release of memory allocation of the present invention.

먼저, 종래의 메모리 관리자를 통한 메모리 할당의 해제에 있어서는, 부분 해제가 불가능하고 할당 받은 해당 메모리의 전체에 대하여만 해제가 가능하다. 예를 들어, 도 2와 같이 메모리 할당 위치가 주 메모리포인터 p'이고 할당 크기가 소정의 사이즈 size (size1 + size2 + size3)인 경우에, 해제 시에는 p' 주 메모리 포인터가 요구되며, p'에 대해 size 전체를 해제하는 방식으로 동작한다. 그러나, 이러한 종래 방식에서는, 어느 계층에서 p', size로 메모리를 할당 받았지만 다른 계층에서 이를 p1, p2, p3로 나누어 사용하다가 p1, p2, p3를 부분적으로 해제하고자 할 경우에는, 기존 메모리 관리자는 p'을 이용하여 size 전체에 대한 해제 요청만을 할 수 있으므로, 해당 계층에서 p1, p2, p3의 부분적 해제 관련하여서는 각 프로세서(사용자)가 별도로 관리하여야 하므로 메모리 사용이 매우 복잡하고 어려운 실정이다.First, in releasing memory allocation through the conventional memory manager, partial releasing is impossible and only the entire allocated memory can be released. For example, when the memory allocation position is the main memory pointer p 'and the allocation size is the predetermined size size (size1 + size2 + size3) as shown in FIG. 2, p' main memory pointer is required to release the p ', and p' Works by releasing the entire size for. However, in this conventional method, when a memory is allocated as p 'and size in one layer but divided into p1, p2, and p3 in another layer and used to partially release p1, p2, and p3, the existing memory manager Since only the release request for the entire size can be made using p ', the memory usage is very complicated and difficult because each processor (user) must manage separately for partial release of p1, p2, and p3 in the layer.

따라서, 본 발명에서는 각 계층에서 메모리를 사용하는 프로세서(사용자)와 메모리 관리자(130) 사이에 도 1과 같이 메모리의 부분적 해제 관리를 위해 패킷 저장 메모리(110) 이외에 중복 해제를 방지하기 위한 해제 관리 메모리(120)를 두어 프로세서(사용자)가 부분적으로 메모리를 해제 가능하도록 하였다. 메모리 할당의 부분 해제를 지원하는 본 발명의 메모리 관리 장치(100)에서는 패킷 저장 메모리(110)에 할당한 데이터에 대해 분할되어 해제하는 경우에 분할 해제 정보를 관리하여, 분할 해제 요구에 대하여 메모리 관리자(130)가 적절한 해제를 처리하고 관리한다. 본 발명의 메모리 관리 장치(100)의 구성 요소들의 동작은 소프트웨어, 하드웨어, 또는 이들의 결합으로 구현하는 것이 가능하다. Accordingly, in the present invention, release management for preventing deduplication other than the packet storage memory 110 for partial release management of the memory between the processor (user) and the memory manager 130 using the memory in each layer as shown in FIG. 1. The memory 120 is provided so that the processor (user) can partially release the memory. In the memory management apparatus 100 of the present invention which supports partial release of memory allocation, the memory manager manages partition release information when the data allocated to the packet storage memory 110 is divided and released, thereby managing the memory manager in response to the partition release request. 130 handles and manages the appropriate release. Operation of the components of the memory management apparatus 100 of the present invention can be implemented in software, hardware, or a combination thereof.

도 1에서, 본 발명의 메모리 관리 장치(100)의 메모리 관리자(130)는, 패킷 저장 메모리(110)의 저장소를 할당할 때, 해당 계층에서 요구된 메모리 크기 또는 그 이상의 패킷 메모리를 데이터 영역으로 할당한다. 예를 들어, 도 1에서 MM1[i]에 해당하는 패킷을 할당하는 경우, 데이터 영역의 시작 주소(포인터)인 'MM1[i] 주소값 + MM1_S'를 포인터 p로 할당한다. 또한, 도 2와 같이, 메모리 관리자(130)는, 해당 계층에서 요구한 메모리 크기를 헤더 MM1[i]의 MM1[i].size 부분에 저장하며, 헤더 MM1[i]의 MM1[i].TAG에 기 정의된 소정의 값(태그정보)을 저장한다. In FIG. 1, when the memory manager 130 of the memory management apparatus 100 of the present invention allocates the storage of the packet storage memory 110, the memory size of the packet size required by the corresponding layer or more is set to the data area. Assign. For example, in FIG. 1, when a packet corresponding to MM1 [i] is allocated, 'MM1 [i] address value + MM1_S', which is a start address (pointer) of the data area, is allocated as a pointer p. As shown in FIG. 2, the memory manager 130 stores the memory size requested by the corresponding layer in the MM1 [i] .size portion of the header MM1 [i] and stores the MM1 [i] of the header MM1 [i]. A predetermined value (tag information) predefined in the TAG is stored.

해제 관리 메모리(120)의 포인터 저장 메모리(121)와 보조 메모리(122)는 메모리 해제를 관리하기 위한 정보를 저장하되, 중복 해제를 방지하기 위한 저장소로서 사용된다. 포인터 저장 메모리(121)에는 각각의 정보를 구분자 MM2[i].p와 같이 패킷 인덱스 i 값만으로 접근 가능하도록, 각 패킷 인덱스 i에 대응시켜 연관 정보(포인터 p)를 저장소에 저장하므로, 빠르게 검색이 가능하지만 저장 가능한 개수가 MM2_MAX로 제한된다. 보조 메모리(122)는 포인터 저장 메모리(121)의 저장소 부족 시에 사용을 위한 보조 저장소로서, 모든 패킷들 각각에 대한 정보를 포인터 구분자 MM3.p 및 패킷 인덱스 구분자 MM3.i로 구분하여 저장한다. 보조 메모리(122)에는 모든 패킷에 대한 정보를 저장할 수 있지만, 포인터 저장 메모리(121)에 비교하여 검색이 느릴 수 있다. 다만, 보조 메모리(122)는 패킷 인덱스 구분없이 모든 패킷들이 공용으로 사용할 수 있어 메모리를 절약할 수 있는 장점이 있다.The pointer storage memory 121 and the auxiliary memory 122 of the release management memory 120 store information for managing memory release, but are used as storage for preventing deduplication. The pointer storage memory 121 stores the association information (pointer p) in correspondence with each packet index i so that each information can be accessed only by the packet index i value, such as the separator MM2 [i] .p. This is possible, but the number that can be stored is limited to MM2_MAX. The auxiliary memory 122 is an auxiliary storage for use when the storage of the pointer storage memory 121 is insufficient. The auxiliary memory 122 divides and stores information about each packet into a pointer delimiter MM3.p and a packet index delimiter MM3.i. The auxiliary memory 122 may store information on all packets, but the search may be slow compared to the pointer storage memory 121. However, the auxiliary memory 122 has an advantage of saving memory because all packets can be used in common without distinguishing the packet index.

좀 더 구체적으로, 메모리 관리자(130)는 포인터 저장 메모리(121)에 패킷 저장 메모리(110)의 부분 해제 대상 포인터들(p)을 저장하며, 중복해제를 검사하기 위해 이를 사용한다. 패킷 저장 메모리(110)의 패킷 인덱스 i를 할당 할 때, 포인터 저장 메모리(121)의 스택 포인터 MM2[i].sp(패킷 인덱스 i 마다의 스택 포인터)는 초기값 0으로 초기화되어 있고, MM2[i].sp를 1씩 증가하면서 부분 해제 대상 포인터들(p)을 MM2[i].p[MM2[i].sp]에 저장한다. More specifically, the memory manager 130 stores the partial release target pointers p of the packet storage memory 110 in the pointer storage memory 121 and uses the same to check for deduplication. When allocating the packet index i of the packet storage memory 110, the stack pointer MM2 [i] .sp (the stack pointer for each packet index i) of the pointer storage memory 121 is initialized to an initial value of 0, and the MM2 [ i] .sp is incremented by 1 and the partial release target pointers p are stored in MM2 [i] .p [MM2 [i] .sp].

포인터 저장 메모리(121)에서 p 포인터를 검색하기 위하여, 메모리 관리자(130)는 주소 MM2[i].p[0] ~ MM2[i].p[MM2[i].sp -1]까지 p 값과 일치하는지를 검사한다. In order to retrieve the p pointer from the pointer storage memory 121, the memory manager 130 stores the p value from the addresses MM2 [i] .p [0] to MM2 [i] .p [MM2 [i] .sp -1]. Check if it matches

스택 포인터 MM2[i].sp가 소정의 최대값 MM2_MAX(자연수)가 되면 더 이상 MM2에는 저장할 수 없으므로, 메모리 관리자(130)는 나머지 부분 해제 대상 포인터들(p)을 보조 메모리(122)에 저장한다. 통신 시스템에서 하나의 패킷이 분할되는 개수는 어느 정도 예측 가능하므로 가능하면 MM2_MAX 개수 내에서 동작하도록 MM2_MAX 값을 설정할 수 있다. 그러나 최악의 경우를 대비해서 MM2_MAX 개수가 부족한 경우에만 보조 메모리(122)에 포인터 구분자 MM3.p 및 패킷 인덱스 구분자 MM3.i로 구분하여 부분 해제 대상 포인터들(p)을 저장한다. When the stack pointer MM2 [i] .sp reaches a predetermined maximum value MM2_MAX (a natural number), it can no longer be stored in MM2, so the memory manager 130 stores the remaining partial release target pointers p in the auxiliary memory 122. do. Since the number of splitting of one packet in the communication system is predictable to some extent, the MM2_MAX value may be set to operate within the number of MM2_MAX whenever possible. However, in order to prepare for the worst case, the partial release target pointers p are stored in the auxiliary memory 122 by the pointer delimiter MM3.p and the packet index delimiter MM3.i only when the number of MM2_MAX is insufficient.

즉, 포인터 저장 메모리(121)와 마찬가지로, 보조 메모리(122)에는 부분 해제 대상 포인터들(p)이 저장되며 중복해제를 검사하기 위해 사용된다. 보조 메모리(122)는 포인터 저장 메모리(121)와 그 기능이 유사하지만, 특정 패킷이 아닌 모든 패킷에 대해 저장 가능한 메모리이다. 보조 메모리(122)는 포인터(p) 저장 개수를 지정하는 스택 포인터 MM3.sp, 각 포인터(p)가 저장되는 MM3.p[n], 그 포인터가 몇 번째 패킷에 속하는지를 지정하기 위한 MM3.i[n] 등의 구분자에 의해 정보가 저장되고 읽어진다. MM3.sp는 시스템 초기화 시에 0으로 설정 된다. That is, like the pointer storage memory 121, the partial release target pointers p are stored in the auxiliary memory 122 and used to check for deduplication. The auxiliary memory 122 is similar in function to the pointer storage memory 121 but is a memory capable of storing all packets other than a specific packet. The auxiliary memory 122 includes a stack pointer MM3.sp which designates the number of pointers p stored therein, MM3.p [n] where each pointer p is stored, and an MM3 for designating which packet the pointer belongs to. Information is stored and read by delimiters such as i [n]. MM3.sp is set to 0 at system initialization.

메모리 관리자(130)는 스택 포인터 MM3.sp를 1씩 증가하면서, MM3.p[MM3.sp] 위치에 포인터(p)를 저장하고, MM3.i[MM3.sp]에 패킷 인덱스 i를 저장한다.The memory manager 130 stores the pointer p at the position MM3.p [MM3.sp] while increasing the stack pointer MM3.sp by 1, and stores the packet index i at MM3.i [MM3.sp]. .

보조 메모리(122)에서 포인터(p)를 삭제하는 과정에 있어서는, 메모리 관리자(130)는 i번째 패킷에 해당 하는 포인터(p)를 삭제하는 경우에, MM3.i[n]의 값을 n = 0 ~ MM3.sp-1까지 검색하여 패킷 인덱스 i 값을 가지는 위치를 검색한다. 예를 들어, MM3.i[x] 값이 패킷 인덱스 i와 같으면, MM3.sp-1에 위치하는 MM3.i[MM3.sp-1]와 MM3.p[MM3.sp-1] 값을 MM3.i[x]와 MM3.p[x]에 저장하고 MM3.sp를 1 감소시킨다.In the process of deleting the pointer p from the auxiliary memory 122, when the memory manager 130 deletes the pointer p corresponding to the i th packet, n = 3 = MM3.i [n]. Search from 0 to MM3.sp-1 to find the location with packet index i. For example, if the value of MM3.i [x] is equal to the packet index i, then the values of MM3.i [MM3.sp-1] and MM3.p [MM3.sp-1] located at MM3.sp-1 are converted to MM3. Store in .i [x] and MM3.p [x] and decrement MM3.sp by one.

보조 메모리(122)에서 p 포인터를 검색하기 위하여, 메모리 관리자(130)는 주소 MM3.p[0] ~ MM3.p[MM2[i].sp -1]까지 p 값과 일치하는지를 검사한다. To retrieve the p pointer from the secondary memory 122, the memory manager 130 checks whether the p value matches the addresses MM3.p [0] through MM3.p [MM2 [i] .sp -1].

이하 도 3의 흐름도를 참조하여 본 발명의 일 실시예에 따른 메모리 관리 장치(100)의 동작을 좀 더 자세히 설명한다. Hereinafter, an operation of the memory management apparatus 100 according to an exemplary embodiment of the present invention will be described in more detail with reference to the flowchart of FIG. 3.

먼저, 이동통신 시스템, 인터넷 시스템 등 통신 시스템 등에서 PDCP, RLC , AC, 모뎀(물리 계층) 등 다수의 신호 처리 계층 각각에서 IP 데이터 패킷을 패킷 저장 메모리(110)에 저장하고, 필요에 따라 해제 대상 포인터(p)과 해제 대상 크기(size)를 지정하여 메모리 할당의 해제를 요청할 수 있다(S110). 해제 대상 크기(size)는 해제 대상 포인터(p)로부터 시작하여 후속하는 해제될 마지막 주소까지의 바이트 단위 등의 크기이다. First, in a communication system such as a mobile communication system and an Internet system, an IP data packet is stored in the packet storage memory 110 in each of a plurality of signal processing layers such as PDCP, RLC, AC, and a modem (physical layer), and if necessary, is released. The release of memory allocation may be requested by specifying a pointer p and a release target size (S110). The release target size is a size, such as in bytes, starting from the release target pointer p and following the last address to be released.

이에 따라 메모리 관리자(130)는 해제 대상 포인터(p)가 주 메모리 포인터(도 2에서 p'=p1에 해당)인지 검사하기 위하여, 패킷 저장 메모리(110)의 해제 대상 포인터(p) 앞의 값이 소정의 값 MM1[i].TAG과 일치하는지 여부를 확인하여 서로 일치하는 경우(S120), 그 해제 대상 크기(size) 또한 패킷 저장 메모리(110)의 MM1[i].size와 일치하는지 여부를 확인하여 서로 일치하면(S121), 해당 해제 요청을 허가하고 종료 한다(S181). 이는 할당 받은 메모리를 분할없이 해당 데이터 영역 모두에 대해 그대로 해제하는 경우에 해당한다. 메모리 관리자(130)는 할당 후 해제된 해당 주 메모리포인터 p'=p1를 다른 메모리 할당 요청에 메모리를 할당하기 위하여 관리할 수 있다. Accordingly, the memory manager 130 checks whether the release target pointer p is the main memory pointer (p '= p1 in FIG. 2), and the value before the release target pointer p of the packet storage memory 110. If it matches with the predetermined value MM1 [i] .TAG, and if they match each other (S120), whether or not the release target size is also equal to MM1 [i] .size of the packet storage memory 110. Check and match with each other (S121), permits the release request and ends (S181). This is the case where the allocated memory is released for all the data areas without partitioning. The memory manager 130 may manage the main memory pointer p '= p1 released after the allocation to allocate memory to another memory allocation request.

위에서 해제 대상 포인터(p)가 주 메모리 포인터(도 2에서 p1에 해당)가 아니거나, 해제 대상 포인터(p)가 주 메모리 포인터이지만 해제 대상 크기(size)가 MM1[i].size와 일치하지 않으면(즉, 부분 해제인 경우), 메모리 관리자(130)는 해제 대상 포인터(p)가 몇 번째 패킷에 속하는지를 계산하여 [수학식1]과 같이 계산되는 값에서 소수점 이하는 버리고 정수값을 취하여 그 패킷 인텍스값 i를 계산한다(S130). FLOOR(k)는 k보다 크지 않은 최대 정수값이다. 이와 같이 계산되는 i가 도 1에서 패킷 인텍스값 i가 된다. The release target pointer p above is not the main memory pointer (corresponding to p1 in FIG. 2) or the release target pointer p is the main memory pointer but the release target size does not match MM1 [i] .size. (Ie, in case of partial release), the memory manager 130 calculates how many packets the pointer to be released (p) belongs to, and discards the decimal point from the value calculated as in Equation 1 and takes an integer value. The packet index value i is calculated (S130). FLOOR (k) is the largest integer value not greater than k. I calculated as above becomes the packet index value i in FIG.

[수학식1][Equation 1]

i = FLOOR( ( p - BASE_ADDRESS ) / ( MM1_S + DATA_S) )i = FLOOR ((p-BASE_ADDRESS) / (MM1_S + DATA_S))

패킷 인텍스값 i를 계산 후, 메모리 관리자(130)는 해제 대상 포인터(p)에 대해 중복 해제를 체크한다(S140). 즉, 메모리 관리자(130)는 부분 해제하고자 하는 해제 대상 포인터(p)가 포인터 저장 메모리(121)의 MM2[i].p와 보조 메모리(122)의 MM3.p에 존재하는지 여부를 검색하여, MM2[i].p 또는 MM3.p에 해제 대상 포인터(p)가 있는 경우는 메모리의 동일 부분 해제를 중복적으로 요청한 경우이므로 종료한다.After calculating the packet index value i, the memory manager 130 checks the deduplication of the release target pointer p (S140). That is, the memory manager 130 searches whether the release target pointer p to be partially released exists in MM2 [i] .p of the pointer storage memory 121 and MM3.p of the auxiliary memory 122. If there is a release target pointer p in MM2 [i] .p or MM3.p, the request is repeated because the same part of memory is repeatedly requested.

위에서 MM2[i].p 또는 MM3.p에 해제 대상 포인터(p)가 존재하지 않는 경우에(S140), 메모리 관리자(130)는 패킷 저장 메모리(110)의 이전 MM1[i].size 정보를 'MM1[i].size - 해제 대상 크기(size)'로 업데이트한다(S150). MM1[i].size는 메모리 할당 시 할당 받은 메모리 사이즈에 해당하며, 부분해제 될 때 마다 부분 해제 크기만큼 감소되어 업데이트된다. When the release target pointer p does not exist in the MM2 [i] .p or the MM3.p (S140), the memory manager 130 reads the previous MM1 [i] .size information of the packet storage memory 110. Update to 'MM1 [i] .size-release target size (size)' (S150). MM1 [i] .size corresponds to the memory size allocated when allocating memory, and is updated by decreasing the partial free size each time it is released.

이때 업데이트된 MM1[i].size 값이 0이 아니면, 패킷 저장 메모리(110)의 해당 패킷 인덱스 i에 대하여 아직도 해제하지 않은 부분 데이터 영역이 존재하므로, 해제 대상 포인터(p)를 포인터 저장 메모리(121)의 MM2[i] 또는 보조 메모리(122)의 MM3.p에 저장 관리한다(S161). 즉, MM2[i].sp가 최대값 MM2_MAX가 아닌 경우에는 해제 대상 포인터(p)를 MM2[i]에 저장하고, MM2[i].sp가 MM2_MAX인 경우는 MM3.p와 MM3.i에 각각 해제 대상 포인터(p)와 패킷 인덱스 i를 저장한다. 이때 위에서 기술한 바와 같이 해당 스택 포인터가 1씩 증가된다.At this time, if the updated MM1 [i] .size value is not 0, there is a partial data area which is not yet released for the corresponding packet index i of the packet storage memory 110, and thus the release target pointer p is replaced with a pointer storage memory ( Storage is managed in MM2 [i] of 121) or MM3.p of auxiliary memory 122 (S161). That is, if MM2 [i] .sp is not the maximum value MM2_MAX, the release target pointer (p) is stored in MM2 [i]. If MM2 [i] .sp is MM2_MAX, the MM3.p and MM3.i are stored. Each stores a release target pointer p and a packet index i. At this time, as described above, the corresponding stack pointer is incremented by one.

위에서 MM1[i].size 값이 0이면(S160), 패킷 인덱스 i 부분의 데이터 영역이 모두 해제된 상태이므로 해당 패킷 전체를 해제할 수 있다. 해당 패킷의 해제를 위하여 MM2[i].sp를 0으로 초기화하고 MM3.p를 검색하여 i 패킷에 속하는 포인터들을 삭제한다(S170).If the value of MM1 [i] .size is 0 (S160), since the data region of the packet index i is completely released, the entire packet may be released. In order to release the corresponding packet, the MM2 [i] .sp is initialized to 0, the MM3.p is searched, and the pointers belonging to the i packet are deleted (S170).

이때 메모리 관리자(130)에서 할당한 메모리를 해제하기 위하여, 메모리 관리자(130)는 할당했던 주 메모리포인터 p'를 [수학식2]와 같이 계산하여 다른 메모리 할당 요청에 메모리를 할당하기 위하여 관리할 수 있다(S180). 주 메모리포인터 p'를 계산 후 메모리 관리자(130)는 해당 해제 요청을 허가하고 종료 한다(S181).In this case, in order to release the memory allocated by the memory manager 130, the memory manager 130 calculates the allocated main memory pointer p 'as shown in [Equation 2] and manages to allocate the memory to another memory allocation request. It may be (S180). After calculating the main memory pointer p ', the memory manager 130 permits the release request and terminates (S181).

[수학식2] [Equation 2]

p' = BASE_ADDRESS + i * ( MM1_S + DATA_S) + MM1_Sp '= BASE_ADDRESS + i * (MM1_S + DATA_S) + MM1_S

예를 들어, 도 2의 예에서, 패킷을 처리하는 각 계층에서 메모리 관리자(130)로부터 size1 + size2 + size3 크기의 메모리를 할당 받은 후, size1, size2, size3로 이루어진 3개의 분할 데이터로 처리될 수 있다. 이때 p1 및 p2 두 개의 데이터에 대해 부분 해제를 하는 경우, S150에서 MM1[i].size = size3 값으로 업데이트될 수 있고, 이후 p3 부분을 해제하게 되면 S160에서 MM1[i].size는 0 값을 가지므로, 해당 패킷에 대해 메모리 관리자(130)에 의해 해제가 처리되고 관리된다.For example, in the example of FIG. 2, after each layer that processes a packet is allocated memory of size1 + size2 + size3 from the memory manager 130, it is processed into three pieces of divided data of size1, size2, and size3. Can be. In this case, when partial release is performed on two pieces of data p1 and p2, SMM may be updated to a value of MM1 [i] .size = size3, and when p3 is released, MM1 [i] .size is 0 in S160. Since the release is processed and managed by the memory manager 130 for the packet.

상술한 바와 같이, 본 발명에 따른 메모리 관리 장치(100)에서는, 통신 시스템 등에서 프로토콜 계층간 데이터 전달을 위해 사용되는 메모리를 각각의 계층에서 할당하고 해제 시에, 하나의 할당받은 메모리를 일정 크기로 분할하여 사용하는 경우 부분적으로 해제 가능하도록 함으로써, 통신 계층간 이동하는 데이터가 분할되더라도 메모리 무복사 시스템을 원활히 구성하여 시스템의 성능을 높일 수 있다.As described above, in the memory management apparatus 100 according to the present invention, when allocating and releasing memory used for data transfer between protocol layers in a communication system or the like, each allocated memory is allocated to a predetermined size. In the case of using the partition, the data can be partially released, so that even if the data moving between the communication layers is divided, the memory copyless system can be configured smoothly, thereby improving the performance of the system.

이상과 같이 본 발명에서는 구체적인 구성 요소 등과 같은 특정 사항들과 한정된 실시예 및 도면에 의해 설명되었으나 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐, 본 발명은 상기의 실시예에 한정되는 것은 아니며, 본 발명이 속하는 분야에서 통상적인 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 발명의 사상은 설명된 실시예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐 아니라 이 특허청구범위와 균등하거나 등가적 변형이 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.As described above, the present invention has been described by specific embodiments such as specific components and the like, but the embodiments and the drawings are provided only to help a more general understanding of the present invention, and the present invention is not limited to the above embodiments. For those skilled in the art, various modifications and variations may be made without departing from the essential features of the present invention. Accordingly, the spirit of the present invention should not be limited to the described embodiments, and all technical ideas having equivalent or equivalent modifications to the claims as well as the following claims are included in the scope of the present invention. Should be interpreted as.

패킷 저장 메모리(110)
해제 관리 메모리(120)
포인터 저장 메모리(121)
보조 메모리(122)
메모리 관리자(130)
Packet Storage Memory 110
Release management memory (120)
Pointer Storage Memory (121)
Secondary Memory (122)
Memory manager (130)

Claims (9)

메모리 할당의 부분 해제를 지원하는 메모리 관리 장치에 있어서,
데이터 패킷의 크기 및 태그 정보가 포함된 헤더 정보와 상기 데이터 패킷의 데이터를, 패킷 인덱스로 구분되는 헤더 및 데이터 영역에 각각 저장하는 패킷 저장 메모리;
상기 패킷 저장 메모리의 할당이 부분 해제된 포인터와 상기 패킷 인덱스를 관리하기 위한 해제 관리 메모리; 및
상기 헤더 정보 및 상기 데이터를 상기 패킷 저장 메모리에 저장하고 관리하며, 상기 패킷 저장 메모리의 할당 해제 요청에 따른 해제 대상 포인터 및 해제 대상 크기, 그리고 상기 해제 대상 포인터가 상기 해제 관리 메모리에 존재하는지 여부에 따라, 상기 패킷 저장 메모리의 부분 해제를 결정하는 메모리 관리자를 포함하며,
상기 메모리 관리자는, 상기 해제 대상 포인터 앞이 상기 태그 정보인지 여부와, 상기 해제 대상 크기와 상기 데이터 패킷의 크기 간의 일치 여부를 판단하여 상기 패킷 저장 메모리의 부분 해제를 결정하는 것을 특징으로 하는 메모리 관리 장치.
A memory management apparatus supporting partial release of memory allocation,
A packet storage memory for storing header information including data packet size and tag information and data of the data packet in a header and a data area separated by a packet index;
A release management memory for managing a pointer in which the allocation of the packet storage memory is partially released and the packet index; And
Storing and managing the header information and the data in the packet storage memory, and a release target pointer and a release target size according to the allocation release request of the packet storage memory, and whether the release target pointer exists in the release management memory. Accordingly, comprising a memory manager for determining a partial release of the packet storage memory,
The memory manager determines whether to release the packet storage memory by determining whether the tag information is in front of the release target pointer and whether the release target size coincides with the size of the data packet. Device.
삭제delete 제1항에 있어서,
상기 메모리 관리자는, 상기 패킷 저장 메모리의 부분 해제가 결정되면, 상기 해제 대상 포인터가 상기 해제 관리 메모리에 존재하는지 여부에 따라 중복 해제 여부를 검사하며, 상기 부분 해제가 상기 중복 해제에 해당하지 않으면 상기 해제 대상 포인터를 상기 해제 관리 메모리에 저장하는 것을 특징으로 하는 메모리 관리 장치.
The method of claim 1,
When the partial release of the packet storage memory is determined, the memory manager checks whether the release target pointer exists in the release management memory or not, and if the partial release does not correspond to the deduplication, And a release target pointer in the release management memory.
제3항에 있어서,
상기 메모리 관리자는, 상기 부분 해제가 상기 중복 해제에 해당하지 않으면, 상기 데이터 패킷의 크기에서 상기 해제 대상 크기를 뺀 값으로 상기 데이터 패킷의 크기를 갱신하며, 갱신된 상기 데이터 패킷의 크기가 0이 아니면, 상기 해제 대상 포인터 및 상기 해제 대상 포인터에 대응된 상기 패킷 인덱스를 상기 해제 관리 메모리에 저장하는 것을 특징으로 하는 메모리 관리 장치.
The method of claim 3,
If the partial release does not correspond to the deduplication, the memory manager updates the size of the data packet by subtracting the release target size from the size of the data packet, and the updated size of the data packet is 0. Otherwise, the release target pointer and the packet index corresponding to the release target pointer are stored in the release management memory.
제3항에 있어서,
상기 메모리 관리자는, 상기 해제 대상 포인터(p)에 대하여 하기의 수학식을 이용하여 상기 패킷 인덱스(i)를 계산하는 것을 특징으로 하는 메모리 관리 장치.
(수학식)
i = FLOOR( ( p - BASE_ADDRESS ) / ( MM1_S + DATA_S) )
여기서, FLOOR(k)는 k보다 크지 않은 최대 정수값, BASE_ADDRESS는 상기 패킷 저장 메모리의 기준 주소, MM1_S는 상기 헤더의 크기, DATA_S는 상기 데이터 영역의 크기이다.
The method of claim 3,
The memory manager calculates the packet index (i) with respect to the release target pointer (p) using the following equation.
(Mathematical formula)
i = FLOOR ((p-BASE_ADDRESS) / (MM1_S + DATA_S))
Here, FLOOR (k) is a maximum integer value not greater than k, BASE_ADDRESS is a reference address of the packet storage memory, MM1_S is the size of the header, and DATA_S is the size of the data area.
제1항에 있어서,
상기 해제 관리 메모리는, 상기 부분 해제된 포인터 및 상기 패킷 인덱스를 관리하기 위한 포인터 저장 메모리 및 보조 메모리를 포함하며,
상기 메모리 관리자는, 상기 포인터 저장 메모리에서 상기 패킷 인덱스에 대응된 저장소에 상기 해제 대상 포인터를 저장하며, 상기 포인터 저장 메모리에서 상기 패킷 인덱스에 대응된 스택 포인터가 기 설정된 최대값에 도달하면, 상기 해제 대상 포인터 및 상기 해제 대상 포인터에 대응된 상기 패킷 인덱스를 상기 보조 메모리의 스택 포인터로 구분된 저장소에 저장하는 것을 특징으로 하는 메모리 관리 장치.
The method of claim 1,
The release management memory includes a pointer storage memory and an auxiliary memory for managing the partially released pointer and the packet index,
The memory manager stores the release target pointer in the storage corresponding to the packet index in the pointer storage memory, and when the stack pointer corresponding to the packet index reaches the preset maximum value in the pointer storage memory, the release is performed. And a packet index corresponding to a target pointer and the release target pointer in a storage divided by a stack pointer of the auxiliary memory.
메모리 관리 장치에서 메모리 할당의 부분 해제를 지원하는 메모리 관리 방법에 있어서,
데이터 패킷의 크기 및 태그 정보가 포함된 헤더 정보를 패킷 저장 메모리의 헤더에 저장하는 단계;
상기 데이터 패킷의 데이터를 상기 패킷 저장 메모리의 데이터 영역에 저장하는 단계;
상기 패킷 저장 메모리의 할당 해제 요청에 따른 해제 대상 포인터 및 해제 대상 크기에 기초하여, 상기 패킷 저장 메모리의 부분 해제를 결정하는 단계;
상기 패킷 저장 메모리의 부분 해제가 결정되면, 상기 패킷 저장 메모리의 할당이 부분 해제된 포인터 및 패킷 인덱스를 관리하기 위한 해제 관리 메모리에 상기 해제 대상 포인터가 존재하는지 여부에 따라서 상기 부분 해제에 대한 중복 해제 여부를 검사하는 단계; 및
상기 부분 해제가 상기 중복 해제에 해당하지 않으면, 상기 해제 대상 포인터 및 상기 해제 대상 포인터에 대응된 상기 패킷 인덱스를 상기 해제 관리 메모리에 저장하는 단계를 포함하며,
상기 결정하는 단계는, 상기 해제 대상 포인터 앞이 상기 태그 정보인지 여부와, 상기 해제 대상 크기와 상기 데이터 패킷의 크기 간의 일치 여부를 판단하여 상기 패킷 저장 메모리의 부분 해제를 결정하는 단계를 포함하는 메모리 관리 방법.
In the memory management method for supporting partial release of memory allocation in the memory management device,
Storing header information including a size of a data packet and tag information in a header of a packet storage memory;
Storing data of the data packet in a data area of the packet storage memory;
Determining a partial release of the packet storage memory based on a release target pointer and a release target size according to the de-allocation request of the packet storage memory;
When the partial release of the packet storage memory is determined, redundancy release for the partial release is determined depending on whether the release target pointer exists in the release management memory for managing the pointer and the packet index in which the allocation of the packet storage memory is partially released. Checking whether there is; And
If the partial release does not correspond to the deduplication, storing the release target pointer and the packet index corresponding to the release target pointer in the release management memory;
The determining may include determining whether the packet storage memory is partially released by determining whether the tag information is in front of the tag information and whether the size of the packet is identical to the size of the data packet. How to manage.
삭제delete 제7항에 있어서,
상기 부분 해제가 상기 중복 해제에 해당하지 않으면, 상기 데이터 패킷의 크기에서 상기 해제 대상 크기를 뺀 값으로 상기 데이터 패킷의 크기를 갱신하는 단계; 및
갱신된 상기 데이터 패킷의 크기가 0이 아니면, 상기 해제 대상 포인터 및 상기 해제 대상 포인터에 대응된 상기 패킷 인덱스를 상기 해제 관리 메모리에 저장하는 단계를 포함하는 것을 특징으로 하는 메모리 관리 방법.
The method of claim 7, wherein
If the partial release does not correspond to the deduplication, updating the size of the data packet by subtracting the release target size from the size of the data packet; And
And storing the release target pointer and the packet index corresponding to the release target pointer in the release management memory when the updated size of the data packet is not equal to zero.
KR1020150029836A 2015-03-03 2015-03-03 Memory Management Apparatus and Method for Supporting Partial Release of Memory Allocation KR102012261B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020150029836A KR102012261B1 (en) 2015-03-03 2015-03-03 Memory Management Apparatus and Method for Supporting Partial Release of Memory Allocation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020150029836A KR102012261B1 (en) 2015-03-03 2015-03-03 Memory Management Apparatus and Method for Supporting Partial Release of Memory Allocation

Publications (2)

Publication Number Publication Date
KR20160106999A KR20160106999A (en) 2016-09-13
KR102012261B1 true KR102012261B1 (en) 2019-10-21

Family

ID=56946524

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020150029836A KR102012261B1 (en) 2015-03-03 2015-03-03 Memory Management Apparatus and Method for Supporting Partial Release of Memory Allocation

Country Status (1)

Country Link
KR (1) KR102012261B1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2355473A1 (en) * 2000-09-29 2002-03-29 Linghsiao Wang Buffer management for support of quality-of-service guarantees and data flow control in data switching
KR100852924B1 (en) * 2004-05-14 2008-08-19 인터디지탈 테크날러지 코포레이션 Method and apparatus for efficiently allocating and deallocating interleaved data stored in a memory stack
CA2644139A1 (en) * 2006-03-31 2007-11-10 Qualcomm Incorporated Memory management for high speed media access control
KR20130003855A (en) * 2011-07-01 2013-01-09 성균관대학교산학협력단 Device and method for providing memory reclamation

Also Published As

Publication number Publication date
KR20160106999A (en) 2016-09-13

Similar Documents

Publication Publication Date Title
US11354230B2 (en) Allocation of distributed data structures
US8751763B1 (en) Low-overhead deduplication within a block-based data storage
JP6122557B2 (en) File migration method and apparatus, and storage device
US10248623B1 (en) Data deduplication techniques
JP6067819B1 (en) Hierarchical storage system, storage controller, and method for deduplication and storage tiering
JP4139675B2 (en) Virtual volume storage area allocation method, apparatus and program thereof
CN107209714B (en) Distributed storage system and control method of distributed storage system
US9946462B1 (en) Address mapping table compression
CN110235098B (en) Storage system access method and device
WO2015089728A1 (en) Repeated data processing method, device, storage controller and storage node
CN110199512B (en) Management method and device for storage equipment in storage system
EP3062229A1 (en) Data migration method, device and processor
JP6268116B2 (en) Data processing apparatus, data processing method, and computer program
CN111459885B (en) Data processing method and device, computer equipment and storage medium
WO2020199760A1 (en) Data storage method, memory and server
JP2022541261A (en) Resource allocation methods, storage devices, and storage systems
US20210248107A1 (en) Kv storage device and method of using kv storage device to provide file system
US10387043B2 (en) Writing target file including determination of whether to apply duplication elimination
CN110199270B (en) Management method and device for storage equipment in storage system
KR102012261B1 (en) Memory Management Apparatus and Method for Supporting Partial Release of Memory Allocation
WO2018127948A1 (en) Computer system
CN113032414B (en) Data management method, device, system, computing equipment and storage medium
CN106021121B (en) Packet processing system, method and apparatus to optimize packet buffer space
US20210133001A1 (en) Methods and systems for optimizing processor usage
WO2018051446A1 (en) Computer system including storage system having optional data processing function, and storage control method

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