KR19980084404A - Memory Management - Google Patents

Memory Management Download PDF

Info

Publication number
KR19980084404A
KR19980084404A KR1019970020190A KR19970020190A KR19980084404A KR 19980084404 A KR19980084404 A KR 19980084404A KR 1019970020190 A KR1019970020190 A KR 1019970020190A KR 19970020190 A KR19970020190 A KR 19970020190A KR 19980084404 A KR19980084404 A KR 19980084404A
Authority
KR
South Korea
Prior art keywords
memory
area
assignable
allocation
packing
Prior art date
Application number
KR1019970020190A
Other languages
Korean (ko)
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 KR1019970020190A priority Critical patent/KR19980084404A/en
Publication of KR19980084404A publication Critical patent/KR19980084404A/en

Links

Landscapes

  • Memory System (AREA)

Abstract

본 발명은 컴퓨터, 복합기, 프린터 등과 같이 메모리를 사용하는 모든 전기 및 전자장치에 있어서, 메모리의 전체영역 중 조각난 부분영역을 모두 합쳐 하나의 새로운 블럭으로 설정하도록 함으로써, 메모리의 효율적인 관리가 가능하도록 한 메모리 관리방법에 관한 것이다.According to the present invention, in all electrical and electronic devices using a memory, such as a computer, a multifunction printer, a printer, etc., all fragmented areas of the entire area of the memory are combined and set as one new block, thereby enabling efficient management of the memory. Memory management method.

본 발명은, 시스템 변수영역과, 스택영역과, 매핑어레이영역과, 할당가능영역으로 분할되어 사용되는 메모리의 관리방법에 있어서: 시스템이 초기화되면 상기 메모리를 상기 시스템 변수영역과 상기 스택영역과 상기 매핑어레이영역과 상기 할당가능영역으로 분할 설정하는 메모리 초기화단계; 상기 메모리의 할당요구가 접수되면, 상기 할당요구된 영역의 크기와 현재 할당가능영역의 크기를 비교하여 할당가능한 상태인가를 판단하는 판단단계; 및 상기 판단단계에서 상기 메모리의 할당이 불가능하다고 판단되면, 상기 매핑어레이영역을 검색하여, 조각난 메모리영역을 패킹하는 패킹단계를 포함하는 메모리 관리방법에 그 특징이 있다.The present invention relates to a method for managing a memory which is divided into a system variable area, a stack area, a mapping array area, and an assignable area, wherein the memory is initialized to the system variable area, the stack area, and the memory area. A memory initialization step of dividing and setting a mapping array region and the assignable region; A determination step of, when the allocation request of the memory is received, determining whether the allocation is possible by comparing the size of the allocation requested area with the size of the current assignable area; And a packing step of packing the fragmented memory area by searching the mapping array area if it is determined that the memory is not allocated in the determination step.

따라서, 메모리 할당요구가 접수되면, 조각난 메모리를 패킹하여 하나의 커다란 할당가능영역을 설정함으로써, 메모리의 낭비를 줄이고, 효율적으로 관리할 수 있는 이점이 있다.Therefore, when a memory allocation request is received, the fragmented memory is packed and one large assignable area is set, thereby reducing the waste of memory and efficiently managing the memory.

Description

메모리 관리방법Memory Management

본 발명은 메모리 관리방법에 관한 것으로서, 보다 상세하게는 컴퓨터, 복합기, 프린터 등과 같이 메모리를 사용하는 모든 전기 및 전자장치에 있어서, 메모리의 전체영역 중 조각난 부분영역을 모두 합쳐 하나의 새로운 블럭으로 설정하도록 함으로써, 메모리의 효율적인 관리가 가능하도록 한 메모리 관리방법에 관한 것이다.The present invention relates to a memory management method, and more particularly, in all electrical and electronic devices using a memory, such as a computer, a multifunction printer, a printer, etc., in which all fragmented partial areas of the entire area of the memory are combined into one new block. The present invention relates to a memory management method that enables efficient management of memory.

종래의 경우, 메모리를 사용하는 전기 및 전자장치내에서, 메모리의 소정영역을 할당받아 임의의 태스크(Task: 작업요소)를 수행한 후 종료하면, 다음 태스크를 수행하기 위해서는 메모리에 점유되어 있는 이전의 태스크를 해제(Release)하여야만 한다. 만약, 이전의 태스크 중 일부 혹은 전부가 해제되지 않은 경우에는, 상기 메모리의 해당영역은 사용할 수 없게 되므로, 이전의 태스크를 해제하는 과정은 다음 태스크의 효율적인 운용을 위해서 필수적인 과정이 아닐 수 없다. 이때, 해제된 메모리영역은 메모리내의 각 영역 중 할당가능한 하나의 영역으로 남게 되며, 다음에 할당요구된 경우에는 요구한 태스크의 크기가 해제된 메모리영역의 크기 이하일 때에만 상기 해제된 메모리영역을 사용할 수 있게 된다.In the related art, when a predetermined area of the memory is allocated to perform a certain task (task element) in the electrical and electronic device using the memory and the terminal ends, the previous memory occupied in the memory is performed to perform the next task. You must release the task. If some or all of the previous tasks are not released, the corresponding area of the memory cannot be used. Therefore, the process of releasing the previous task may not be essential for efficient operation of the next task. In this case, the released memory area remains as an allocable area of each area in the memory, and when the allocation is requested next, the released memory area is used only when the requested task size is less than or equal to the size of the released memory area. It becomes possible.

결국, 상기한 바와 같은 종래의 메모리에 의하면, 해제요구된 부분을 할당가능한 영역 중 하나로 설정하게 되며, 이 해제영역의 크기가 할당요구된 영역보다 작으면 상기 해제영역은 사용할 수 없는 영역으로 된다. 따라서, 시스템을 수행하는 도중 발생한 많은 부분의 메모리 조각들 중 일부는 다시 사용할 수 없는 경우가 발생하여 메모리가 낭비되는 현상이 발생하며, 이로 인하여 메모리 관리가 비효율적이라는 문제점이 발생하게 되었다.As a result, according to the conventional memory as described above, the release requested portion is set to one of the assignable regions. If the size of the release region is smaller than the allocated region, the release region becomes an unusable region. As a result, some of the large pieces of memory that are generated during system execution may not be usable again, resulting in a waste of memory, resulting in inefficient memory management.

따라서, 본 발명은 상기한 문제점들을 해결하기 위한 것으로서, 본 발명의 목적은 메모리의 할당가능영역과 이미 할당되어 있는 할당영역을 구분하여, 해당 메모리블럭에 대해 메모리 매핑(Mapping)영역에 기록(표시)을 함으로써, 일상적인 메모리 매핑영역을 탐색(Scanning)하여 연속적으로 할당가능한 메모리영역을 하나의 할당가능영역으로 설정하도록 한 메모리 관리방법을 제공함에 있다.Accordingly, an object of the present invention is to solve the above problems, and an object of the present invention is to classify an allocable area of a memory from an already allocated area and to record (display) the memory block in a memory mapping area. The present invention provides a memory management method in which a routine memory mapping area is scanned to set a continuously assignable memory area as one assignable area.

도 1은 본 발명에 적용된 메모리 관리장치의 개략적 내부구성도,1 is a schematic internal configuration diagram of a memory management apparatus applied to the present invention;

도 2는 도 1에 도시된 메모리 관리장치의 동작흐름도,FIG. 2 is an operation flowchart of the memory management apparatus shown in FIG. 1;

도 3은 메모리 맵(Memory Map)의 개념도이다.3 is a conceptual diagram of a memory map.

*도면의주요부분에사용된부호의설명** Description of the symbols used in the main parts of the drawings *

1: 메모리 관리장치2: 메모리 초기화부1: memory management unit 2: memory initialization unit

3: 메모리 해제부4: 메모리 할당부3: memory releasing unit 4: memory allocation unit

5: 메모리 패킹부6: 메모리5: memory packing part 6: memory

7: 시스템 변수영역8: 스택영역7: system variable area 8: stack area

9: 매핑어레이영역10: 할당가능영역9: mapping array area 10: assignable area

상기한 바와 같은 목적을 달성하기 위한 본 발명의 특징은, 시스템 변수영역과, 스택영역과, 매핑어레이영역과, 할당가능영역으로 분할되어 사용되는 메모리의 관리방법에 있어서: 시스템이 초기화되면 상기 메모리를 상기 시스템 변수영역과 상기 스택영역과 상기 매핑어레이영역과 상기 할당가능영역으로 분할 설정하는 메모리 초기화단계; 상기 메모리의 할당요구가 접수되면, 상기 할당요구된 영역의 크기와 현재 할당가능영역의 크기를 비교하여 할당가능한 상태인가를 판단하는 판단단계; 및 상기 판단단계에서 상기 메모리의 할당이 불가능하다고 판단되면, 상기 매핑어레이영역을 검색하여, 조각난 메모리영역을 패킹하는 패킹단계를 포함하는 메모리 관리방법에 있다.A feature of the present invention for achieving the above object is a method for managing a memory which is divided into a system variable area, a stack area, a mapping array area, and an assignable area. A memory initialization step of dividing and setting the system variable area into the stack area, the mapping array area, and the assignable area; A determination step of, when the allocation request of the memory is received, determining whether the allocation is possible by comparing the size of the allocation requested area with the size of the current assignable area; And a packing step of retrieving the mapping array region and packing the fragmented memory region if it is determined that the allocation of the memory is impossible in the determination step.

상기한 본 발명의 특징에 있어서, 상기 패킹단계를 수행한 후, 상기 패킹단계에서 패킹된 메모리영역이 상기 할당요구된 메모리영역보다 작으면 상기 패킹단계를 계속 수행하고, 상기 패킹된 메모리영역이 상기 할당요구된 메모리영역보다 크거나 같으면 상기 할당가능영역을 할당하는 단계를 더 포함하는 것이 바람직하다.In the above aspect of the present invention, after performing the packing step, if the memory area packed in the packing step is smaller than the allocated memory area, the packing step is continued, and the packed memory area is The method may further include allocating the allocable area if the allocation area is greater than or equal to the required memory area.

이하, 본 발명에 의한 메모리 관리방법의 바람직한 실시예에 대하여 첨부도면을 참조하여 상세히 설명한다.Hereinafter, a preferred embodiment of the memory management method according to the present invention will be described in detail with reference to the accompanying drawings.

도 1에는 본 발명에 적용된 메모리 관리장치의 개략적 내부구성도가 도시되어 있다.1 shows a schematic internal configuration diagram of a memory management apparatus applied to the present invention.

도 1에 도시된 바와 같이 본 발며에 의한 메모리 관리장치(1)는 크게, 메모리 초기화부(2)와, 메모리 해제부(3)와, 메모리 할당부(4)와, 메모리 패킹부(5)로 대별된다. 즉, 본 발명은, 상기한 메모리 초기화부(2)와 메모리 해제부(3) 및 메모리 할당부(4)로 구성된 일반적인 메모리 관리장치의 구성에서 메모리 패킹부(5)를 더 포함하였다. 이때, 메모리 패킹부(5)는 메모리 할당부(4)내의 일부영역을 공유하도록 구성할 수도 있으며, 메모리 할당부(4)와 독립된 영역으로 구성할 수도 있다.As shown in FIG. 1, the memory management apparatus 1 according to the present invention has a memory initializing unit 2, a memory releasing unit 3, a memory allocating unit 4, and a memory packing unit 5. It is roughly divided into. That is, the present invention further includes a memory packing unit 5 in the configuration of a general memory management apparatus including the memory initialization unit 2, the memory release unit 3, and the memory allocating unit 4 described above. In this case, the memory packing unit 5 may be configured to share a partial region in the memory allocating unit 4 or may be configured as an area independent of the memory allocating unit 4.

상기한 바와 같은 구성을 갖는 본 발명의 동작에 대하여 도 2 및 도 3을 참조하여 설명하면 다음과 같다.The operation of the present invention having the configuration as described above will be described with reference to FIGS. 2 and 3.

컴퓨터, 프린터, 복합기 등의 전기 및 전자장치에서는 메모리의 효율적인 관리가 시스템의 성능을 좌우하는 커다란 요소로 작용하게 되며, 시스템의 실행중에 메모리는 할당 및 해제동작이 계속적으로 반복되어 사용된다.In electrical and electronic devices such as computers, printers, and multifunction devices, efficient management of the memory is a major factor in determining the performance of the system. During the execution of the system, the memory is repeatedly allocated and released.

이때, 메모리의 할당과 반복은 순차적으로 수행되지 않는 것이 일반적이며, 이로 인하여 처음에는 하나의 거대한 할당가능영역을 포함하던 메모리가 다수개의 영역으로 분할되고, 분할된 다수개의 영역 중 크기가 작은 영역은 그 영역에 적합한 할당요구를 접수하지 못하면 영원히 사용할 수 없는 경우가 발생하기도 한다.In this case, it is common that memory allocation and repetition are not sequentially performed. As a result, a memory that initially contained one huge allocable area is divided into a plurality of areas, and a small area among the plurality of divided areas is If the appropriate allocation request is not received for the area, it may be unusable forever.

통상적으로, 메모리는 기본적인 단위(크기)로 관리되며, 그 단위는 필요에 따라 16바이트, 32바이트, 64바이트…… 등으로 설정된다.Typically, memory is managed in basic units (sizes), which are 16 bytes, 32 bytes, 64 bytes... … And the like.

메모리(6)가 초기화되면(S1), 메모리 초기화부(2)는 도 3에 도시된 바와 같이, 메모리(6)의 전체영역 중 일부영역을 시스템 변수영역(7)과 스택(Stack)영역(8)으로 할당한다. 또한, 메모리(6)의 전체영역 중 다른 일부영역을 스테이터스어레이(Status Array) 및 태스크어레이(Task Array)를 기록할 수 있는 매핑어레이영역(Mapping Array Area)(9)으로 할당한 후, 나머지 영역을 할당 가능영역(10)으로 설정한다.When the memory 6 is initialized (S1), as shown in FIG. 3, the memory initialization unit 2 may replace a part of the entire area of the memory 6 with the system variable area 7 and the stack area (Stack). 8). The other partial area of the entire area of the memory 6 is allocated to a mapping array area 9 capable of recording a status array and a task array, and then the remaining area. Is set to the allocable area (10).

이후, 메모리(6)의 전체영역 중 일부영역이 임의의 태스크에 의해 할당요구된 경우(S2), 메모리 할당부(4)는 할당가능한 영역을 검색하여 메모리(6)가 할당가능한가를 판단한다(S3). 여기서, 임의의 태스크에 의해 할당요구된 영역의 크기가 메모리(6)의 할당가능영역(10)의 크기보다 커서 메모리(6)가 할당가능하지 않다고 판단되면, 메모리 할당부(4)는 매핑어레이영역(9)을 검색하여(S4), 조각난 메모리영역의 할당가능한 임의의 영역에 포함시키는 패킹작업을 수행한다(S5).Then, when a partial area of the entire area of the memory 6 is requested to be allocated by an arbitrary task (S2), the memory allocating unit 4 searches the assignable area to determine whether the memory 6 is assignable ( S3). Here, if it is determined that the size of the area allocated by any task is larger than the size of the assignable area 10 of the memory 6 and that the memory 6 is not assignable, the memory allocating unit 4 performs a mapping array. The area 9 is searched for (S4), and a packing operation for inclusion in any of the allocable areas of the fragmented memory area is performed (S5).

만약, 상기의 단계 3(S3)에서 임의의 태스크에 의해 할당요구된 영역의 크기가 메모리(6)의 할당가능영역의 크기보다 작아서 메모리(6)가 할당가능하다고 판단되면, 메모리 할당부(4)는 메모리(6)의 할당가능영역을 우선적으로 할당하고(S6), 매핑어레이영역(9)에 할당된 영역을 기록(표시)한다(S7).If the size of the area allocated by the task in step 3 (S3) is smaller than the size of the allocable area of the memory 6, and it is determined that the memory 6 is assignable, the memory allocator 4 ) Allocates an allocable area of the memory 6 first (S6), and records (displays) the area allocated to the mapping array area 9 (S7).

한편, 도시되지는 않았지만, 메모리 해제부(3)는 태스크가 종료되었음을 감지하여, 상기 태스크에 할당된 메모리(6)의 영역을 검색하여 이를 해제함으로써, 다음 할당요구에 대응할 수 있도록 하였다.Although not shown, the memory releasing unit 3 detects that the task is finished, searches for an area of the memory 6 allocated to the task, and releases the same, thereby responding to the next allocation request.

결국, 상기한 바와 같은 본 발명에 의하면, 메모리 할당요구가 접수되면, 조각난 메모리를 패킹하여 하나의 커다란 할당가능영역을 설정함으로써, 메모리의 낭비를 줄이고, 효율적으로 관리할 수 있는 이점이 있다.As a result, according to the present invention as described above, when a memory allocation request is received, the fragmented memory is packed and one large allocable area is set, thereby reducing the waste of memory and efficiently managing the memory.

Claims (2)

시스템 변수영역과, 스택영역과, 매핑어레이영역과, 할당가능영역으로 분할되어 사용되는 메모리의 관리방법에 있어서:In the method for managing memory used by dividing into a system variable area, a stack area, a mapping array area, and an assignable area: 시스템이 초기화되면 상기 메모리를 상기 시스템 변수영역과 상기 스택영역과 상기 매핑어레이영역과 상기 할당가능영역으로 분할 설정하는 메모리 초기화단계;A memory initialization step of dividing and setting the memory into the system variable region, the stack region, the mapping array region, and the assignable region when the system is initialized; 상기 메모리의 할당요구가 접수되면, 상기 할당요구된 영역의 크기와 현재 할당가능영역의 크기를 비교하여 할당가능한 상태인가를 판단하는 판단단계; 및A determination step of, when the allocation request of the memory is received, determining whether the allocation is possible by comparing the size of the allocation requested area with the size of the current assignable area; And 상기 판단단계에서 상기 메모리의 할당이 불가능하다고 판단되면, 상기 매핑어레이영역을 검색하여, 조각난 메모리영역을 패킹하는 패킹단계를 포함하는 메모리 관리방법.And determining that the allocation of the memory is impossible in the determining step, retrieving the mapping array area and packing a fragmented memory area. 청구항 1에 있어서, 상기 패킹단계를 수행한 후,The method of claim 1, after performing the packing step, 상기 패킹단계에서 패킹된 메모리영역이 상기 할당요구된 메모리영역보다 작으면 상기 패킹단계를 계속 수행하고, 상기 패킹된 메모리영역이 상기 할당요구된 메모리영역보다 크거나 같으면 상기 할당가능영역을 할당하는 단계를 더 포함하는 메모리 관리방법.In the packing step, if the packed memory area is smaller than the allocated requested memory area, continuing the packing step; and if the packed memory area is larger than or equal to the allocated requested memory area, allocating the assignable area. Memory management method further comprising.
KR1019970020190A 1997-05-23 1997-05-23 Memory Management KR19980084404A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019970020190A KR19980084404A (en) 1997-05-23 1997-05-23 Memory Management

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019970020190A KR19980084404A (en) 1997-05-23 1997-05-23 Memory Management

Publications (1)

Publication Number Publication Date
KR19980084404A true KR19980084404A (en) 1998-12-05

Family

ID=65991418

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019970020190A KR19980084404A (en) 1997-05-23 1997-05-23 Memory Management

Country Status (1)

Country Link
KR (1) KR19980084404A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100811349B1 (en) * 2001-10-17 2008-03-07 엘지전자 주식회사 Media File System and The Method of the Management
KR101378058B1 (en) * 2012-03-30 2014-03-27 국방과학연구소 Dynamic memory managing methof in embedded system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4660130A (en) * 1984-07-24 1987-04-21 Texas Instruments Incorporated Method for managing virtual memory to separate active and stable memory blocks
JPH06214874A (en) * 1993-01-13 1994-08-05 Toshiba Corp Memory managing system
JPH08249225A (en) * 1995-03-10 1996-09-27 Nec Corp Memory management device
KR19980020793A (en) * 1996-09-11 1998-06-25 김광호 How to manage communication buffer of printer

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4660130A (en) * 1984-07-24 1987-04-21 Texas Instruments Incorporated Method for managing virtual memory to separate active and stable memory blocks
JPH06214874A (en) * 1993-01-13 1994-08-05 Toshiba Corp Memory managing system
JPH08249225A (en) * 1995-03-10 1996-09-27 Nec Corp Memory management device
KR19980020793A (en) * 1996-09-11 1998-06-25 김광호 How to manage communication buffer of printer

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100811349B1 (en) * 2001-10-17 2008-03-07 엘지전자 주식회사 Media File System and The Method of the Management
KR101378058B1 (en) * 2012-03-30 2014-03-27 국방과학연구소 Dynamic memory managing methof in embedded system

Similar Documents

Publication Publication Date Title
KR100446339B1 (en) Real time data migration system and method employing sparse files
JP2858795B2 (en) Real memory allocation method
US6804761B1 (en) Memory allocation system and method
CN105637491A (en) File migration method and apparatus and storage device
GB2446071A (en) Method of dynamic memory management in an object oriented system
CN111190537B (en) Method and system for managing sequential storage disk in additional writing scene
US5678024A (en) Method and system for dynamic performance resource management within a computer based system
US7991976B2 (en) Permanent pool memory management method and system
US20100299672A1 (en) Memory management device, computer system, and memory management method
KR19980084404A (en) Memory Management
CN116501487A (en) Task execution method and device on virtual machine, storage medium and electronic equipment
KR101376268B1 (en) Device and method of memory allocation with 2 stage for mobile phone
CN115168317A (en) LSM tree storage engine construction method and system
JP2008027162A (en) Data recording apparatus and data recording program
WO2004084095A9 (en) Information retrieving system
KR19990019417A (en) Memory Management
US20130179653A1 (en) Apparatus and method for partitioning memory area for application preloading in a wireless terminal
KR19990038538A (en) Memory management method and device
KR19980084403A (en) Memory Management
JPS6364146A (en) Logical space control system
JP2000010842A (en) Method and system for file management
JPH0869399A (en) File management device
KR19990081567A (en) How to manage the memory of the printer
JP2565129B2 (en) Volume division management method
JP2789657B2 (en) Communications system

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application