IP Library › Granted Patent US 9,405,697
Granted Patent B2
US 9,405,697 · App. 14/307,371 · Granted Aug 2, 2016

Memory management method and apparatus

Inventors: Jin Kyu Koo (Gyeonggi-do, KR); Sang-Bok Han (Gyeonggi-do, KR); Myung Sun Kim (Gyeonggi-do, KR); In Choon Yeo (Gyeonggi-do, KR)
Assignee: Samsung Electronics Co., Ltd.
G06F12/10G06F12/0253G06F12/0292G06F12/109
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,405,697
App. No.
14/307,371
Granted
Aug 2, 2016
Kind
B2
Abstract

A method for managing memory using a virtual memory manager includes receiving a memory allocation request, allocating memory of a physical address space in response to the memory allocation request, mapping an address value of the memory allocated in the physical address space to consecutive primary virtual address space, and mapping the address value of the primary virtual address space to one of a first and second secondary virtual address spaces to process a new memory allocation request in a situation where memory a fragmentation occurs. Other embodiments are also disclosed. The methods and apparatuses of the present disclosure are capable of moving active memory blocks of the fragmented virtual memory space to another virtual memory space to resolve the memory fragmentation even when a memory fragmentation occurs.

Claims (49)

1. A memory management method of an electronic device, the method comprising:

receiving a memory allocation request for data;

allocating physical address space of a memory space to the data in response to the memory allocation request;

mapping address values of the memory allocated in the physical address space to a consecutive primary virtual address space; and

mapping the address values of the primary virtual address space to one of a first and second secondary virtual address spaces to process a next memory allocation request in a situation where a memory fragmentation occurs.

2. The method of claim 1 , wherein the physical address space, the primary virtual address space, the first secondary virtual space, and the second secondary virtual space are identical in size.

3. The method of claim 1 , further comprising:

moving, when the memory fragmentation occurs, active memory blocks of the one of the first and second secondary virtual address spaces, the one which is in use, to the other secondary virtual address space not in use currently.

4. The method of claim 3 , further comprising:

determining, when a consecutive memory size unallocated in the virtual address space used by a process is less than a memory size requested by the process, that the memory is fragmented.

5. The method of claim 3 , wherein moving the active memory blocks comprises:

changing the secondary virtual address without change of physical address and first virtual address corresponding to the active memory blocks.

6. The method of claim 3 , wherein moving the active memory blocks comprises:

checking whether an active memory block exists;

determining, when the active memory block exists, a new secondary virtual address necessary for moving the checks active memory block; and

mapping, when the new address is determined, the new virtual address to the primary virtual address of the corresponding memory block.

7. The method of claim 6 , wherein determining the new secondary virtual address comprises:

returning a least address value of memory unallocated in the secondary virtual address space to which the active memory block is moved; and

determining the address value of the address space corresponding to the returned address value as a new secondary virtual address value.

8. The method of claim 3 , further comprising:

allocating, when the next memory allocation request is received, a memory with a size requested in the next memory allocation request; and

determining whether the memory allocation request is an active memory block transfer request or the next memory allocation request.

9. The method of claim 8 , further comprising:

updating, when the memory allocation request is the active memory block transfer request, the secondary virtual address mapping information in the mapping table.

10. The method of claim 8 , further comprising:

adding, when the memory allocation request is the next memory allocation request, the mapping information on the physical address and the first and second virtual addresses corresponding to the new memory block, to the mapping table.

11. An electronic device having a memory, the electronic device comprising:

a memory unit configured to store at least one data; and

a controller configured to:

receive a memory allocation request for the data;

allocate a physical address space of a memory to the data in response to the memory allocation request;

map address values of the memory allocated in the physical address space to a consecutive primary virtual address space; and

map the address values of the primary virtual address space to one of a first and second secondary virtual address spaces to process a next memory allocation request in a situation where a memory fragmentation occurs.

12. The electronic device of claim 11 , wherein the primary virtual address space, the first secondary virtual space, and the second secondary virtual space are identical in size.

13. The electronic device of claim 12 , wherein the controller is configured to:

return a least address value of memory unallocated in the secondary virtual address space to which the active memory block is moved, and

determine the address value of the address space corresponding to the returned address value as a new secondary virtual address value.

14. The electronic device of claim 11 , wherein the controller is configured to move, when the memory fragmentation occurs, active memory blocks of the one of the first and second secondary virtual address spaces, the one which is in use, to the other secondary virtual address space not in use currently.

15. The electronic device of claim 14 , wherein the controller is configured to determine, when a consecutive memory size unallocated in the virtual address space used by a process is less than a memory size requested, that the memory is fragmented.

16. The electronic device of claim 14 , wherein the controller is configured to change the secondary virtual address without a change of physical addresses and first virtual address corresponding to the active memory blocks.

17. The electronic device of claim 14 , wherein the controller is configured to

check whether an active memory block exists,

determine, when any active memory block exists, a new secondary virtual address necessary for moving the active memory block, and

maps, when the new address is determined, the new virtual address to the primary virtual address of the corresponding memory block.

18. The electronic device of claim 14 , wherein the controller is configured to:

allocate, when a next memory allocation request is received, a memory with the size requested in receiving the new memory allocation request, and

determine whether the memory allocation request is an active memory block transfer request or new memory allocation request.

19. The electronic device of claim 14 , wherein the controller is configured to update, when the memory allocation request is the active memory block transfer request, the secondary virtual address mapping information in the mapping table.

20. The electronic device of claim 14 , wherein the controller is configured to add, when the memory allocation request is the new memory allocation request, the mapping information on the physical address and the first and second virtual addresses corresponding to the new memory block to the mapping table.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 17, 2014
From: KOO, JIN KYU; HAN, SANG-BOK; KIM, MYUNG SUN; YEO, IN CHOON
To: SAMSUNG ELECTRONICS CO., LTD
Reel/Frame 033122/0814 →
Priority Claims (1)
KR 10-2013-0069214 · Jun 17, 2013 · national
Continuity (1)
Related Publication 20140372726A1 · Dec 18, 2014