JPH06511582A - Computer method and system for allocating and freeing memory - Google Patents
Computer method and system for allocating and freeing memoryInfo
- Publication number
- JPH06511582A JPH06511582A JP6504753A JP50475394A JPH06511582A JP H06511582 A JPH06511582 A JP H06511582A JP 6504753 A JP6504753 A JP 6504753A JP 50475394 A JP50475394 A JP 50475394A JP H06511582 A JPH06511582 A JP H06511582A
- Authority
- JP
- Japan
- Prior art keywords
- block
- free
- size
- segment
- list
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Memory System (AREA)
Abstract
(57)【要約】本公報は電子出願前の出願データであるため要約のデータは記録されません。 (57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】 メモリを割り当てそして解放するコンピュータ方法及びシステム驚叫9分野 本発明は、一般に、メモリを管理するためのコンピュータ方法及びシステムに係 り、より詳細には、ヒープ構造を使用するメモリを割り当て、解放しそしてコン パクト化する方法及びシステムに係る。[Detailed description of the invention] 9 amazing computer methods and systems to allocate and free memory The present invention generally relates to computer methods and systems for managing memory. More specifically, allocating, freeing, and compiling memory using heap structures. This invention relates to a method and system for compacting.
先行扶術 コンピュータシステムはコンピュータメモリを動的に管理することができる。Preliminary aid Computer systems can dynamically manage computer memory.
動的なメモリ管理とは、メモリのブロックを特定の目的に対して一時的に割り当 てそしてその目的に対してもはや必要でなくなったときに割り当て解除即ち解放 するプロセスを指す。空いたブロックは、別の目的のための再割り当てに使用す ることができる。動的にメモリを管理するプロセスをメモリマネージャーと称す る。メモリマネージャーが管理するメモリを「ヒープ」と称する。ヒープとは、 プログラムか実行するまで存在又はサイズを決定することができないデータ構造 の一時的な記憶に使用するためにプログラムに指定されるメモリの部分である。Dynamic memory management refers to the temporary allocation of blocks of memory for specific purposes. and deallocation or release when it is no longer needed for that purpose. refers to the process of Empty blocks can be used for reallocation for other purposes. can be done. The process that dynamically manages memory is called a memory manager. Ru. The memory managed by the memory manager is called a "heap." What is a heap? a data structure whose existence or size cannot be determined until the program is executed A portion of memory designated to a program for use in temporary storage.
プログラムは、あるサイズをもつ空きメモリのブロックを要求し、それを使用し そして後でそのブロックを解放するように要求することかできる。メモリマネー ジャーは、要求を発しているプログラムの必要に応じてヒープから異なるサイズ のメモリブロックを割り当てる。A program requests a block of free memory of a certain size and uses it. You can then request that the block be released later. memory money The jars are made of different sizes from the heap depending on the needs of the program making the request. allocate a block of memory.
プログラムは、メモリブロックを必要とするときに、メモリマネージャーに要求 を送る。メモリマネージャーは、その要求を満足するためにヒープからメモリの ブロックを割り当て、そしてそのメモリブロックに対するハンドル即ちポインタ をその要求を発しているプログラムに返送する。次いで、その要求を発している プログラムは、そのハンドル即ちポインタを介してメモリのブロックをアクセス することができる。要求を発しているプログラムは、メモリブロックの使用を終 えると、ブロックがもはや必要でないことをメモリマネージャーに通知する。When a program needs a block of memory, it makes a request to the memory manager. send. The memory manager extracts memory from the heap to satisfy its requests. Allocate a block and obtain a handle or pointer to that memory block is sent back to the program making the request. then issuing the request A program accesses a block of memory through its handle, or pointer. can do. The program making the request must finish using the memory block. When a block is deleted, it notifies the memory manager that the block is no longer needed.
次いで、メモリマネージャーは、そのメモリブロックを解放し、割り当てに使用 できるようにする。メモリマネージャーは、要求を発しているプログラムにメモ リブロックを割り当てできない(ヒープか充分大きなブロックを含んでいないた めに)ときには、全ての空きブロックを統合するように通常はヒープをコンパク ト化する。The memory manager then frees that memory block and uses it for allocation. It can be so. The memory manager sends notes to the program making the request. Unable to allocate a reblock (because the heap does not contain a large enough block) Sometimes the heap is usually compacted to consolidate all free blocks. to become
発畏ド渇陀旨 本発明の目的は、コンピュータメモリのための改良されたメモリ管理プロセスを 提供することである。Afraid of thirst An object of the present invention is to provide an improved memory management process for computer memory. It is to provide.
本発明の別の目的は、要求を発しているプログラムにメモリのブロックを割り当 てる改良された方法を提供することである。Another object of the invention is to allocate blocks of memory to programs making requests. The objective is to provide an improved method for
本発明の別の目的は、要求を発しているプログラムがメモリをもはや必要としな くなったときにメモリのブロックを解放する改良された方法を提供することであ る。Another object of the invention is that the program making the request no longer requires memory. By providing an improved way to free blocks of memory when they are no longer available. Ru.
本発明の更に別の目的は、メモリをコンパクト化する改良された方法を提供する ことである。Yet another object of the invention is to provide an improved method of compacting memory. That's true.
これら及び他の目的は、本発明の以下の詳細な説明より明らかとなるように、動 的にメモリを管理する改良された方法及びシステムによって達成される。好まし い実施例においては、コンピュータシステムにおいて実行されている要求を発ス ルフログラムカ、データ構造を一時的に記憶するためにメモリの隣接ブロック( ヒープ)を割り当てる。本発明によって設けられたヒープマネージャーは、要求 を発するプログラムからの命令に応答してヒープを管理する。ヒープマネージャ ーは、ヒープを、均一サイズの2″個のセグメントに分割する。ヒープマネージ ャーは、要求を発しているプログラムにメモリのブロックを割り当てる。要求を 発しているプログラムかメモリブロックの使用を終えると、ヒープマネージャー はメモリブロックを解放し、メモリブロックを割り当てできるようにする。These and other objects will become apparent from the following detailed description of the invention. This is accomplished by an improved method and system for managing memory in a consistent manner. preferred In a preferred embodiment, a computer system that issues a request to be executed on a computer system; Ruflogramka, contiguous blocks of memory ( heap). The heap manager provided by the present invention manage the heap in response to instructions from programs that issue heap manager The heap manager divides the heap into uniformly sized 2″ segments. The programmer allocates a block of memory to the program making the request. request When the issuing program or memory block is finished using it, the heap manager frees a memory block and makes it available for allocation.
好ましい実施例において、ヒープマネージャーは、各セグメントごとに空きリス トを維持し、これは、そのセグメントで始まる空きブロックのリンクされたリス トである。各空きリストは、最大空きブロックアレイ及びサイズツリーを介して アクセスできる。この最大空きブロックアレイは複数のエントリーを有し、各エ ントリーは1つのセグメントに対応し、そのセグメントに対する空きリストの開 始を指す。サイズツリーは、各ノードの値がその子ノードの最大値に等しくなる ように構成された完全な2進ツリーである。サイズツリーの各リーフノードは最 大空きブロックアレイの2つのエントリーに対応する。各リーフノードに含まれ た値は、空きブロックアレイの2つのエントリーに対応するセグメントにおける 最大空きブロックのサイズを指示する。In the preferred embodiment, the heap manager maintains a free list for each segment. This creates a linked list of free blocks starting with that segment. It is. Each free list is routed through the largest free block array and size tree. Can be accessed. This largest free block array has multiple entries, with each An entry corresponds to one segment and the free list is opened for that segment. Points to the beginning. A size tree is one in which the value of each node is equal to the maximum value of its child nodes. This is a complete binary tree constructed as follows. Each leaf node of the size tree is Corresponds to two entries in the large free block array. included in each leaf node The values in the segment corresponding to the two entries in the free block array are Indicates the size of the largest free block.
ヒープマネージャーは、要求されたサイズのメモリの空きブロックをヒープから 選択することにより要求を発しているプログラムにメモリのブロックを割り当て る。ヒープマネージャーは、サイズツリー及び空きブロックアレイをサーチして 、要求を満足する空きブロックを含むセグメントを選択し、そしてその選択され たセグメントに対応する空きリストをサーチして、その要求を満足する最小の空 きブロックを位置決めすることにより、空きブロックを選択する。ヒープマネー ジャーは、要求を発しているプログラムの要求においてメモリのブロックを解放 し、そしてその解放されたブロックを、該ブロックのすぐ上又はすぐ下に位置す る空きブロックと統合する。The heap manager removes free blocks of memory of the requested size from the heap. Allocate a block of memory to the requesting program by selecting Ru. The heap manager searches the size tree and free block array to , select a segment containing a free block that satisfies the request, and then Search the free list corresponding to the requested segment and find the smallest free list that satisfies the request. An empty block is selected by positioning the empty block. heap money frees blocks of memory at the request of the requesting program. and place the freed block directly above or below it. merge with free blocks.
ヒープマネージャーは、割り当て要求を満足できないときには、メモリ外(アウ ト・オブ・メモリ)コールを行って、その要求を発しているプログラムに、ヒー プをコンパクト化するか、或いはヒープをより大きな又はより小さなサイズに割 り当てるかの任意選択を与える。ヒープマネージャーは、割り当てられたブロッ クをヒープ内のより上位のアドレスに移動して、下位アドレスの空きブロックを 統合することにより、ヒープをコンパクト化する。ヒープマネージャーは、その 割り当てられたブロックがどこに移動されるかを追跡するためにそれらの割り当 てられたブロックに対するハンドルを任意に維持する。要求を発しているプログ ラムがコールバックルーチンを備えているときには、ヒープマネージャーは、コ ールバックリターンを呼び出し、割り当てられたブロックが移動されようとして いるときにその要求を発しているプログラムに通知し、その要求を発しているプ ログラムがその割り当てられたブロックに対して有しているポインタを更新でき るようにする。When the heap manager cannot satisfy an allocation request, it the program making the request. compact the heap or split the heap into larger or smaller sizes. give you the option of choosing which one to guess. The heap manager manages allocated blocks. blocks to higher addresses in the heap to free up free blocks at lower addresses. Compact the heap by consolidating. The heap manager Allocated blocks can be tracked to track where they are moved. Optionally maintains a handle to the block that was created. The program making the request When a program has a callback routine, the heap manager callback return and the allocated block is about to be moved. to notify the program making the request when the request is made, and A program cannot update the pointer it has to its allocated block. so that
図面の簡単な説明 図1は、要求を発しているプログラムと、ヒープマネージャーと、ヒープとの関 係を示す概略図である。Brief description of the drawing Figure 1 shows the relationship between the requesting program, the heap manager, and the heap. FIG.
図2Aは、図1に示されたブロックエリアの例示的なセグメントレイアウトを示 す図である。FIG. 2A shows an exemplary segment layout of the block area shown in FIG. This is a diagram.
図2Bは、図2Aに示されたブロックエリアの例示的なセグメントレイアウトを 示す図である。FIG. 2B shows an example segment layout of the block area shown in FIG. 2A. FIG.
図3は、制御エリアとブロックエリアの一部分との関係を示す概略図である。FIG. 3 is a schematic diagram showing the relationship between a control area and a portion of a block area.
図4は、要求を発しているプログラムにデータブロックを割り当てるために本発 明によって使用される方法の詳細な流れ線図である。Figure 4 shows how the main program can allocate data blocks to the program making the request. 1 is a detailed flow diagram of the method used by Akira.
図5A及び5Bは、要求を発しているプログラムの要求においてデータブロック を解放するために本発明によって使用される方法の詳細な流れ線図である。Figures 5A and 5B show data blocks in the requests of the requesting program. 1 is a detailed flow diagram of the method used by the present invention to release .
図6A及び6Bは、ヒープをコンパクト化するために本発明によって使用される 方法の詳細な流れ線図である。6A and 6B are used by the present invention to compact the heap. 1 is a detailed flow diagram of the method;
図7Aは、サイズツリー、最大空きブロックアレイ、データブロックアレイ、及 びハンドルブロックを、コンパクト化の前の状態で示した概略図である。Figure 7A shows the size tree, largest free block array, data block array, and FIG. 2 is a schematic diagram showing the handle block and handle block in a state before compaction.
図7Bは、サイズツリー、最大空きブロックアレイ、データブロックアレイ、及 びハンドルブロックを、コンパクト化の後の状態で示した概略図である。Figure 7B shows the size tree, largest free block array, data block array, and FIG. 4 is a schematic diagram showing the handle block and handle block in a state after compaction.
好Jしい 施例の詳細な脱B 本発明は、ヒープの動的なメモリ管理のための方法及びシステムを提供する。Detailed example of how to get rid of B The present invention provides a method and system for dynamic memory management of a heap.
ヒープとは、データ構造を一時的に記憶するために要求を発しているプログラム によって使用されるメモリの論理的に隣接するエリアである。ヒープマネージャ ーと称するプログラムが、コンピュータシステム上で実行されている要求を発し ているプログラムによりなされたサービス要求に応対する。サービス要求には、 ヒープ内のメモリスペースの割り当て、解放及びコンパクト化が含まれる。図1 は、要求を発しているプログラム100と、ヒープマネージャー101と、ヒー プ105との関係を示す概略図である。A heap is a program that makes requests to temporarily store data structures. are logically contiguous areas of memory used by heap manager A program called respond to service requests made by programs running For service requests, It includes allocating, freeing, and compacting memory space within the heap. Figure 1 The program 100 issuing the request, the heap manager 101, and the heap FIG.
好ましい実施例では、メモリマネージャーは、ヒープ内に種々のデータ構造を維 持する。図1を参照すれば、本発明の好ましい実施例において、ヒープ105は 、3つの主たるエリアに分割される。即ち、制御情報を保持するヘッダエリア1 02と、要求に基づいて割り当てられそして解放されるメモリのブロックを含む ブロックエリア103と、制御情報を含む制御エリア104である。ヘッダエリ ア102は、ブロックエリア103の下に物理的に配置され、そしてブロックエ リアは、制御エリア104の下に物理的に配置される。ヒープ内の位置を参照す るときには、「下」は下位のメモリアドレスを意味し、そして「上」は上位のメ モリアドレスを意味する。或いは又、ヘッダエリア102と制御エリア104が ブロックエリア103に物理的に隣接して配置されなくてもよい。In the preferred embodiment, the memory manager maintains various data structures within the heap. hold Referring to FIG. 1, in a preferred embodiment of the invention, heap 105 is , divided into three main areas. That is, header area 1 that holds control information 02 and blocks of memory that are allocated and freed on demand. They are a block area 103 and a control area 104 containing control information. header area The area 102 is physically located below the block area 103 and The rear is physically located below the control area 104. Referencing a location in the heap When ``lower'' refers to the lower memory address, and ``upper'' refers to the upper memory address. means mori address. Alternatively, header area 102 and control area 104 may It does not have to be placed physically adjacent to the block area 103.
ヘッダエリア102は、ヒープのサイズや、制御エリア104の構造及びブロッ クエリア103内の特定ブロックを指すポインタのような制御情報を含む。ブロ ックエリア103はセグメントに分割される。セグメントとは、空きブロックの リストを維持する際にヒープマネージャーによって使用されるメモリの論理的に 隣接するエリアである。ブロックエリア103をセグメントに分割することは以 下で詳細に説明する。又、ブロックエリア103はブロックにも分割される。The header area 102 contains information such as the heap size, the structure of the control area 104, and blocks. Contains control information such as a pointer pointing to a specific block within the querier 103. Bro The storage area 103 is divided into segments. A segment is a free block. Logically of the memory used by the heap manager in maintaining the list It is an adjacent area. Dividing the block area 103 into segments is as follows. This will be explained in detail below. The block area 103 is also divided into blocks.
ブロックとは、要求を発しているプログラムの要求においてヒープマネージャー によって割り当てられ解放されるメモリの論理的に隣接するエリアである。A block is a heap manager are logically contiguous areas of memory that are allocated and freed by
ブロックエリア103の各ブロックは、ブロックのサイズを指示するサイズフィ ールドで始まる。ブロックのサイズは偶数であるのが好ましい。というのは、ブ ロックが空いているかどうかを指示するのにサイズフィールドの下位ビットが使 用されるからである。空きブロックは、サイズフィールドの下位ビットがセット されており、一方、割り当てられたブロックは、このビットがクリアされている 。セグメント内の全ての空きブロックは互いにリンクされて、そのセグメントの 空きリストを形成する。各空きブロックは、好ましくはサイズフィールドの後に 配置されたポインタであって、その同じセグメント内で開始する次に小さな空き ブロックを指すポインタを含んでいる。従って、各セグメントは、そのセグメン ト内の空きブロックのリンクされたリスト(サイズによる)である対応する空き リストを有している。各ブロックの最後のフィールドは、空き暗示フィールドと して使用される。この空き暗示フィールドは、ブロックが空いている場合には独 特の符諜値にセットされる。この空き暗示フィールドは、ブロックを解放すると きに、その解放されたブロックが空きブロックに隣接しているかどうかを判断す る助けとして使用される。もしそうであれば、その解放されたブロックがその隣 接する空きブロックと組み合わされて、1つの空きブロックを形成する。Each block in the block area 103 has a size field that indicates the size of the block. It starts with a cold. Preferably, the size of the blocks is an even number. This is because The lower bits of the size field are used to indicate whether the lock is free. This is because it is used. Free blocks have the lower bit of the size field set. and the allocated block, on the other hand, has this bit cleared. . All free blocks within a segment are linked together to Form a free list. Each free block preferably follows the size field a placed pointer to the next smallest free space starting in the same segment Contains a pointer to a block. Therefore, each segment the corresponding free block, which is a linked list (by size) of free blocks in the I have a list. The last field of each block is a free implied field. used. This free implicit field is unique if the block is free. Set to a special intelligence value. This free implicit field is determine whether the freed block is adjacent to a free block. used as an aid. If so, that freed block is next to It is combined with adjacent free blocks to form one free block.
制御エリア104は、最大空きブロックアレイとサイズツリーを備えている。Control area 104 includes a maximum free block array and a size tree.
最大空きブロックアレイは、各セグメントごとに1つのエントリーを含むリスト である。最大空きブロックアレイの各エントリーは、そのエントリーに対応する セグメントの空きリストの開始を指す。上記したように、各セグメントの空きリ ストは、サイズに基づくセグメント内の空きブロックのリンクされたリストであ り、セグメント内の最大の空きブロックが空きリストの開始となるようになって いる。The largest free blocks array is a list containing one entry for each segment. It is. Each entry in the largest free block array corresponds to Points to the start of the segment's free list. As mentioned above, each segment's free resources are A list is a linked list of free blocks within a segment based on size. The largest free block in the segment is now the start of the free list. There is.
サイズツリーは、ハイアラーキ形態に一緒にリンクされたノードを含むデータ構 造体である。ノードは、各サブツリー内の最大空きブロックのサイズを表す値を 含んでいる。最も上のノードは、ルートノードと称する。このルートノードは2 つの子ノードを有し、そしてルートノードは、その子ノードに対する親ノードで ある。サイズツリー内の各子ノードは、それ自身の2つの子ノードを有している 。サイズツリー内の各ノードは、何ももたないルートノードを除いて、厳密に1 つの親ノードを有する。子ノードをもたないノードを、リーフノードと称してい る。サイズツリーは、いずれのノードに含まれた値もその子ノードのいずれかに 含まれた値の大きい方に等しいという特性を有する完全な2進ツリーである。A size tree is a data structure containing nodes linked together in a hierarchical form. It is a structure. A node carries a value representing the size of the largest free block within each subtree. Contains. The topmost node is called the root node. This root node is 2 has one child node, and the root node is the parent node for its child nodes. be. Each child node in the size tree has its own two child nodes . Each node in the size tree has exactly 1, except for the root node, which has nothing. It has one parent node. A node that has no child nodes is called a leaf node. Ru. A size tree means that any value contained in any node will be added to one of its child nodes. It is a complete binary tree with the property that it is equal to the greater of the included values.
サイズツリーは、各子ノードが親ノードNに対し位置2N及び2N+1に配置さ れるように編成されるのが好ましい。サイズツリーは、各セグメントにおける最 大の空きブロックのサイズに基づいてセグメントを編成する。サイズツリーは、 ブロックエリアにおけるセグメントの数をNとすれば、N−1個のノードを含ん でいる。サイズツリーの各ノードは、そのサブツリーにおいて使用できる最大の 空きブロックのサイズを含み、従って、ルートノードはヒープにおける最大の空 きブロックのサイズを含む。サイズツリーの各リーフノードは、最大空きブロッ クアレイにおける2つのエントリーに対応し、最大空きブロックアレイにおける 対応するエントリーによって指示された最大空きブロックのサイズをリーフノー ドが含むようになっている。The size tree is such that each child node is placed at position 2N and 2N+1 with respect to the parent node N. It is preferable that the The size tree is the largest size in each segment. Organize segments based on the size of large free blocks. The size tree is If the number of segments in a block area is N, it contains N-1 nodes. I'm here. Each node in the size tree has the largest size available in its subtree. Contains the size of free blocks, so the root node is the largest free block in the heap. Contains the size of the block. Each leaf node of the size tree has a maximum free block. corresponds to two entries in the quad array and the largest free block in the array. Set the size of the largest free block indicated by the corresponding entry to the leaf node. It is now included.
ブロックエリアは、完全な2進ツリーであるサイズツリーに対応するよう2″セ グメントに分割される。好ましい実施例においては、ヒープの初期化中に、ヒー プマネージャーは、ブロックエリア103のサイズを最小のセグメントサイズで 分割しそしてその結果を次に低い2の累乗に丸めることによってセグメントの数 を決定する。最小のセグメントサイズ(要求を発しているプログラムによって指 定された)は、その要求を発しているプログラムの必要性に基ついて通常10O Oないし2000バイトの任意の値になる。最終的なセグメントサイズは、ブロ ックエリア103のサイズをセグメント数で分割することにより決定される。The block area is divided into 2″ sections to correspond to the size tree, which is a complete binary tree. segment. In the preferred embodiment, during heap initialization, The program manager sets the size of block area 103 to the minimum segment size. the number of segments by dividing and rounding the result to the next lowest power of 2 Determine. Minimum segment size (specified by the program making the request) (specified) is typically 100% based on the needs of the program making the request. It can be any value between 0 and 2000 bytes. The final segment size is The size of the storage area 103 is determined by dividing the size of the storage area 103 by the number of segments.
例えば、ブロックエリア103が900バイトを含みそし“C最小セグメントサ イズが100バイトである場合には、ヒープマネージャーは最終セグメントサイ ズを次のように決定する。第1に、ヒープマネージャーは、ブロックエリア1゜ 3のサイズを最小セグメントサイズで分割し、9を得る(900/100)。第 2に、ヒープマネージャーは、その結果を次に低い2の累乗に丸めて、セグメン トの数を決定する。9を次に低い2の累乗に丸めると、8セグメントとなる。最 後に、ヒープマネージャーは、ブロックエリア103のサイズ(900)をセグ メント数(8)で分割して、最終的なセグメントサイズ113バイト(900/ 8)を決定する。最後のセグメントは109だけである。というのは、この例に おけるセグメントの数は、ブロックエリアのサイズに均一に分割されないからで ある。図2Aは、8個のセグメント200ないし207を有するブロックエリア 103の例示的なセグメントレイアウトである。For example, if block area 103 contains 900 bytes and “C minimum segment size If the size is 100 bytes, the heap manager uses the final segment size. Determine the size as follows. First, the heap manager has a block area of 1° Divide the size of 3 by the minimum segment size to get 9 (900/100). No. 2, the heap manager rounds the result to the next lowest power of 2 and divides the result into segments. Determine the number of points. Rounding 9 to the next lowest power of 2 results in 8 segments. most Later, the heap manager segments the size (900) of block area 103. The final segment size is 113 bytes (900/ 8) Determine. The last segment is only 109. Because in this example This is because the number of segments in the block area is not evenly divided into the size of the block area. be. FIG. 2A shows a block area with eight segments 200 to 207. 103 is an exemplary segment layout.
図2Bは、ブロックエリア103の例示的なブロックレイアウトであり、セグメ ントの境界は破線で示されており、そしてブロックの境界は実線で示されている 。ブロックエリア103は、ハンドルブロック210と、マスターブロック21 1と、データブロック212払エンドブロツク213とを備えている。要求を発 しているプログラムは、ハンドル又はポインタであるブロック識別子を用いてデ ータブロックをアクセスする。ハンドルとは、メモリの割り当てられたブロック の識別子であり、ポインタに対するポインタと考えることができる。要求を発し ているプログラムがメモリのブロックを要求するときには、ヒープマネージャー は、メモリのブロックを割り当て、そしてその割り当てられたブロックに対する ブロック識別子をその要求を発しているプログラムへ返送する。プログラムが管 理応対(例えば、ブロックを解放する)を要求するときには、プログラムはブロ ック識別子を用いてブロックを識別する。ハンドルブロック210は、以下に述 べるようにヒープコンパクト化の間に該ブロックが移動しないようにデータブロ ック212の下に配置されるのが好ましい。FIG. 2B is an exemplary block layout of block area 103, with segment Component boundaries are shown with dashed lines, and block boundaries are shown with solid lines. . The block area 103 includes a handle block 210 and a master block 21. 1 and a data block 212 payout end block 213. issue a request The program using the block identifier, which is a handle or pointer, access the data block. A handle is an allocated block of memory. It can be thought of as a pointer to a pointer. make a request When a program running requests a block of memory, the heap manager allocates a block of memory, and then Sends the block identifier back to the program making the request. The program is in control When requesting a logical response (e.g., freeing a block), the program Block identifiers are used to identify blocks. The handle block 210 is described below. data block to prevent the block from being moved during heap compaction. Preferably, it is located below the rack 212.
マスターブロック211は、ハンドルブロック210とデータブロック212と の間に配置されるのが好ましい。マスターブロック211は、ハンドルブロック 210の上部又はデータブロック212の底部へ転送することのできる使用可能 なメモリスペースを含んでいる。ヒープが初期化されたときには、マスターブロ ックは、全ての使用可能な空きスペースを含む。ヒープマネージャーは、マスタ ーブロックの上部からデータブロックの形態で空きスペースを転送することによ り、要求を発しているプログラムにデータブロックを割り当てる。マスターブロ ックは、その上下のブロックに対して付加的なスペースを与えるように使用でき るので、マスターブロックが常に余計なスペースを含むことはない。データブロ ック212は、要求を発しているプログラムに割り当てられたブロックであるか 、或いは空いていて割り当てに使用できるブロックである。ブロックの割り当て 及び解放を、各々、図4及び5に示され、これについては以下に説明する。エン ドブロック213は、ヒープシェイク中に使用されるべき空きスペースを含んで おり、これは「デバッキング」の部分で詳細に説明する。マスターブロック21 1及びエンドブロック213は、要求を発しているプログラムに割り当てられな いように、割り当てられたブロックとしてマークされる。又、エンドブロック2 13は、データブロックを解放する間にも使用される。The master block 211 has a handle block 210 and a data block 212. Preferably, it is placed between. The master block 211 is a handle block 210 or the bottom of data block 212. Contains a large amount of memory space. When the heap is initialized, the master block The block contains all available free space. The heap manager -by transferring free space in the form of data blocks from the top of the block. allocates the data block to the program making the request. master bro Blocks can be used to provide additional space for the blocks above and below them. , so the master block does not always contain extra space. data blog Is block 212 a block allocated to the program making the request? , or a block that is free and available for allocation. Block allocation and release are shown in FIGS. 4 and 5, respectively, and are discussed below. en Block 213 contains the free space to be used during the heap shake. This will be explained in detail in the "Debugging" section. master block 21 1 and end block 213 are not allocated to the requesting program. The block is marked as allocated, as if it were an allocated block. Also, end block 2 13 is also used while freeing data blocks.
図3は、制御エリアとブロックエリアの一部分との間の関係を示す概略図である 。この例において、ブロックエリアは8つのセグメントに分割されている(セグ メント境界340ないし342が破線で示されている)。制御エリアは、サイズ ツリー300及び最大空きブロックアレイ310を含んでいる。最大空きブロッ クアレイのエントリー320ないし327は、各々、ブロックエリアのセグメン トOないし7に対応する。図3には、セグメント5及び6のデータブロックしか 示されていない。最大空きブロックアレイ320のエントリー326は、セグメ ント6の空きリストの開始部を指す。ブロック331は、その空きリストの開始 部である。ブロック331は、次いで、次に小さな空きブロック332を指すポ インタを含み、そしてブロック332は、次に小さな空きブロック333を指す ポインタを含む。たとえ空きブロック334がセグメント境界341を横切って 延びていても、空きブロック334はセグメント6の空きリストには含まれない ことに注意されたい。最大空きブロックアレイ310におけるエントリー325 は、セグメント5の空きリストの開始部である空きブロック334を指すポイン タを含んでいる。セグメント5の空きリストはブロック334ないし336を含 む。FIG. 3 is a schematic diagram showing the relationship between a control area and a portion of a block area. . In this example, the block area is divided into eight segments (segment (mention boundaries 340-342 are shown in dashed lines). The control area is the size It includes a tree 300 and a largest free block array 310. maximum free block Quaray entries 320 to 327 each represent a block area segment. Corresponds to numbers O to 7. In Figure 3, only the data blocks of segments 5 and 6 are shown. Not shown. Entries 326 in largest free block array 320 are segment Points to the beginning of the free list for point 6. Block 331 is the start of the free list. Department. Block 331 then points to the next smaller free block 332. contains an inter, and block 332 points to the next smaller free block 333 Contains pointers. Even if free block 334 crosses segment boundary 341 Even though it is extended, free block 334 is not included in the free list of segment 6. Please note that. Entry 325 in largest free block array 310 is a pointer pointing to free block 334, which is the beginning of the free list for segment 5. Contains ta. The free list for segment 5 includes blocks 334-336. nothing.
図3に使用した例は、ナルポインタを含む最大空きブロックアレイ310のエン トリー320ないし324及び327(各々、セグメント0ないし4及びセグメ ント7に対応する)を示している。ナルポインタは、対応するセグメントに使用 できる空きブロックがないことを示す。リーフノード304.305 (エント リー320ないし323に対応し、これらは次いでセグメント0ないし3に対応 する)の各々は、セグメント0ないし3における最も大きな空きブロックのサイ ズを表す値Oを含んでいる。リーフノード306は、セグメント4及び5におけ る最も大きな空きブロックのサイズである3oを含む。リーフノード307は、 セグメント6及び7における最も大きな空きブロックのサイズである4oを含ん でいる。サイズツリーの各ノードはそのサブツリーに使用できる最も大きな空き ブロックのサイズを含むので、ノード302は0を含み、ノード303は4oを 含む。ルートノード301は、ヒープにおける最も大きな空きブロックのサイズ である40を含む。The example used in Figure 3 shows the entry of the largest free block array 310 containing the null pointer trees 320 to 324 and 327 (segments 0 to 4 and segments 0 to 4, respectively) (corresponding to point 7). Null pointer is used for the corresponding segment Indicates that there are no free blocks available. Leaf node 304.305 (ent correspond to segments 320 to 323, which in turn correspond to segments 0 to 3. ) is the size of the largest free block in segments 0 to 3. It contains the value O representing the value. Leaf nodes 306 in segments 4 and 5 Includes 3o, which is the size of the largest free block. The leaf node 307 is Contains 4o, which is the size of the largest free block in segments 6 and 7. I'm here. Each node in the size tree is the largest free space available for its subtree. contains the size of the block, so node 302 contains 0 and node 303 contains 4o. include. The root node 301 is the size of the largest free block in the heap including 40.
別の実施例においては、上記例のサイズツリーが、ノード303.306及び3 07のみで構成される。ノード303はルートノードとなる。ヒープマネージャ ーは、サイズツリーのルートノードに対するポインタを図1のヘッダエリア10 2に維持する。セグメント0ないし3は、いかなる空きブロックも含まないので 、サイズツリーでは表されない。サイズツリーのこの実施例は、特定サイズの空 きブロックを見つけるために行う必要のあるサーチの量を減少する。あるブロッ クがセグメント0,1.2又は3において空きとなると、サイズツリー300は ノード301.302.304及び305を含むように成長し、ルートノードに 対するポインタがそれに応じて調整される。In another embodiment, the size tree of the above example may have nodes 303.306 and 3. Consists of only 07. Node 303 becomes the root node. heap manager The pointer to the root node of the size tree is stored in the header area 10 of Figure 1. Maintain at 2. Segments 0 to 3 do not contain any free blocks, so , not represented in the size tree. This example of a size tree Reduces the amount of searches that need to be done to find blocks. A block When a block becomes free in segment 0, 1.2 or 3, the size tree 300 Grows to include nodes 301.302.304 and 305 and becomes the root node The pointer to the pointer is adjusted accordingly.
ここに述べるヒープマネージャーは、データブロックを参照するハンドル及びポ インタの両方をサポートする。コンパクト化の間に、ヒープマネージャーは、要 求を発しているプログラムへ任意のコールバックを行ってヒープマネージャーが 新たな位置へブロックを移動することを指示する。要求を発しているプログラム は、次いで、ブロックの新たな位置を表すためにそれが使用できるいかなるポイ ンタも更新することができる。割り当ての間に、ハンドルブロックに使用できる ハンドルがない場合には、ヒープマネージャーは、マスターブロックの底部から スペースを得てハンドルブロックを拡大する。マスターブロックが小さ過ぎる場 合には、ヒープマネージャーはヒープをコンパクト化し、要求を再エントリーす る。或いは又、ヒープマネージャーは、要求を発しているプログラムによって供 給されるルーチンを呼び出す。このルーチンは、「ヒープのコンパクト化」とい う見出しで以下に説明する。The heap manager described here handles and points that refer to data blocks. Supports both interfaces. During compaction, the heap manager The heap manager makes an arbitrary callback to the program issuing the request. Instructs to move a block to a new position. Program making the request then returns any pointer it can use to represent the new position of the block. can also be updated. Can be used for handle blocks during assignments If there is no handle, the heap manager handles the handle from the bottom of the master block. Gain space and expand the handle block. If the master block is too small If so, the heap manager compacts the heap and re-enters the request. Ru. Alternatively, the heap manager may Call the supplied routine. This routine is called ``compact heap.'' It is explained below under the following heading.
データブロック要求−り半工: 図4は、本発明の好ましい実施例の流れ線図で ある。この流れ線図は、要求を発しているプログラムにデータブロックを割り当 てるためにヒープマネージャーによって使用される方法の概要である。要求され たサイズをもつデータブロックに対する割り当て要求はヒープマネージャーに通 される。プロセスはステップ401で始まり、ヒープマネージャーは必要とされ るブロックのサイズを決定する。ヒープマネージャーは、これか内部で使用する サイズフィールド及び他の運転管理フィールドのサイズを、要求を発しているプ ログラムにより要求されるサイズに加えなければならない。ステップ402にお いて、ヒープマネージャーは、必要とされるブロックのサイズを、サイズツリー のルートノードに含まれた値(これは最も大きな空きブロックのサイズである) と比較することにより要求を満足できるかどうかを判断する。ヒープマネージャ ーは、サイズツリーのルートノードに対するポインタを図1のヘッダエリア10 2に維持する。必要とされるブロックのサイズが、サイズツリーのルートノード に含まれた値以下である場合には、データブロック要求を満足するようにデータ ブロックを現在使用することができる。Data Block Request Process: Figure 4 is a flow diagram of a preferred embodiment of the present invention. be. This flow diagram allocates data blocks to the program making the request. This is an overview of the methods used by the heap manager to requested An allocation request for a data block with a specified size is passed to the heap manager. be done. The process begins at step 401, where a heap manager is required. Determine the size of the block to be used. Use the heap manager internally The size of the size field and other operational control fields can be determined by the requesting program. must be added to the size required by the program. In step 402 The heap manager determines the required block size using the size tree The value contained in the root node of (this is the size of the largest free block) It is determined whether the requirements can be satisfied by comparing with the heap manager The pointer to the root node of the size tree is stored in the header area 10 of Figure 1. Maintain at 2. The required block size is the root node of the size tree is less than or equal to the value contained in the data block request. Blocks are currently available for use.
プロセスはステップ406へ続き、ヒープマネージャーは、要求を満足するに充 分大きなブロックについて右手方式でサイズツリーをサーチする。−L位アドレ スの空きブロックか下位アドレスの空きブロックより前に割り当てられるように 確保するためにツリーは右方式でサーチされる。例えば、隔子ノードが要求を満 足するに充分な大きさの値を含む場合には、右の子ノードが左の子ノードの前に 選択される。同様に、最大空きブロックアレイの両エントリーが、要求を満足す るに充分な大きさのブロックを含む空きリストを指す場合には、右のエントリー が左のエントリーより先に選択される。The process continues to step 406 where the heap manager fills the heap to satisfy the request. Search the size tree using the right-hand method for blocks that are as large as the size of the block. -L address be allocated before a free block at the address or a free block at a lower address. The tree is searched in a right-handed manner to ensure that. For example, a spacer node satisfies a request. The right child node precedes the left child node if it contains a value large enough to add. selected. Similarly, both entries in the largest free block array satisfy the request. If you want to point to a free list containing blocks large enough to is selected before the left entry.
ヒープマネージャーが最大空きブロックアレイのエントリーを選択すると、プロ セスはステップ407へ続き、ヒープマネージャーは、要求を満足する最小の使 用可能な空きブロックを見つけて選択するために、その選択されたエントリーに よって指示された空きリストをサーチする。このような空きブロックが選択され た後に、ステップ408において、ヒープマネージャーは、その選択された空き ブロックが2つのブロックに仕切られてもその要求を満足するに充分な大きさで あるかどうかを判断する。一方のブロックが要求を満足するに充分な大きさであ りそして他方のブロックが必要なポインタ情報及びブロックサイズを記憶するに 充分な大きさである場合に、空きブロックは2つのブロックに仕切られるに充分 な大きさである。もしそうであれば、プロセスはステップ409へ続き、ブロッ クが2つのブロックに仕切られ、その一方は要求を発しているプログラムに割り 当てられるものでありそしてもう一方は空きリストに保たれるものである。空き ブロックの残りの部分は、空きリストの適当な位置に挿入され、もし必要であれ ば、サイズツリー及び最大空きブロックアレイは、新たな(より小さな)最大サ イズで更新される。When the heap manager selects the largest free block array entry, the The process continues to step 407, where the heap manager determines the minimum usage amount that satisfies the request. to the selected entry to find and select an available free block. Therefore, the designated free list is searched. A free block like this is selected After that, in step 408, the heap manager stores the selected free Even if the block is divided into two blocks, it is large enough to satisfy the requirements. determine whether there is. One block is large enough to satisfy the request. and the other block stores the necessary pointer information and block size. An empty block is large enough to be partitioned into two blocks if it is large enough. It is a large size. If so, the process continues to step 409 where the block block is partitioned into two blocks, one of which is assigned to the program making the request. one is applied and the other is kept in the free list. Vacant The remainder of the block is inserted into the free list at the appropriate position, if necessary. For example, the size tree and max free block array will be changed to the new (smaller) max Updated with is.
選択された空きブロックが2つのデータブロックに仕切っても要求を満足するに 充分な大きさでない場合には、ステップ410において、ヒープマネージャーは 、その選択された空きブロックを空きリストから除去し、そして必要に応じてサ イズツリー及び最大空きブロックアレイを更新する。プロセスはステップ412 で終了し、ここで、ヒープマネージャーは、空き暗示フィールド及びサイズフィ ールドの下位ビットをクリアすることによりその選択された空きブロックを割り 当てられたものとマークする。ヒープマネージャーは、選択された空きブロック のアドレスを参照するハンドル又はポインタであるブロック識別子を、要求を発 しているプログラムに返送する。ブロック識別子は、サイズフィールドのすぐ上 のメモリ位置を参照する。Even if the selected free block is partitioned into two data blocks, the request cannot be satisfied. If it is not large enough, in step 410 the heap manager , removes the selected free block from the free list, and optionally update the size tree and largest free block array. The process is step 412 where the heap manager fills the free implicit field and the size field. Allocates the selected free block by clearing the lower bit of the field. Mark as correct. The heap manager uses selected free blocks The block identifier, which is a handle or pointer that refers to the address of send it back to the program you are using. The block identifier is just above the size field Refers to the memory location of
ステップ402を参照すると、必要とされるデータブロックのサイズがサイズツ リーのルートノードに含まれた値より大きい場合には、要求を満足するための空 きブロックがブロックエリアにおいて使用できない。ヒープマネージャーは、も しスペースが使用できるならば、マスターブロックからスペースを得ることによ り要求を発しているプログラムを満足するように試みる。マスターブロックのサ イズはマスターブロックのサイズフィールドに記憶され、マスターブロックを指 すポインタはヘッダエリアに記憶される。マスターブロックからスペースを得る 而に、ステップ403において、ヒープマネージャーは、マスターブロックをそ のすぐ上に位置するであろう空きブロックと統合することによりマスターブロッ クを拡張するように試みる。次いで、ステップ404において、ヒープマネージ ャーは、データブロック要求をマスターブロックによって受け入れられるかどう か判断する。この判断は、必要とされるデータブロックのサイズをマスターブロ ックのサイズと比較することにより行われる。マスターブロックが要求を満足す るに充分な大きさでない場合には、ヒープマネージャーは、ブロック405にお いて、メモリ外コールを行い、ブロック402に復帰して再試みする。Referring to step 402, the size of the required data block is empty to satisfy the request if the value is greater than the value contained in the root node of the tree. block cannot be used in the block area. The heap manager is also by obtaining space from the master block, if space is available. attempt to satisfy the program issuing the request. master block support The size is stored in the master block size field and points to the master block. The pointer is stored in the header area. get space from master block Then, in step 403, the heap manager removes the master block from its master block by merging it with a free block that would be located directly above it. attempt to expand the network. Then, in step 404, the heap manager The controller determines whether the data block request can be accepted by the master block. to judge. This decision determines the size of the data block required by the master block. This is done by comparing the size of the The master block satisfies the request. If the heap manager is not large enough to then makes an out-of-memory call and returns to block 402 to try again.
或いは又、ヒープマネージャーは、要求を発しているプログラムによって供給さ れるルーチンを呼び出す。このルーチンは、「ヒープのコンパクト化」という見 出しで以下に説明する。コンパクト化の後に、プロセスはステップ402ヘルー プして戻り、そこで、ヒープマネージャーは、要求を満足するに充分なメモリが あるかどうか判断する。ヒープのコンパクト化又は拡張の後に、要求を満足する に充分なメモリがない場合には、ヒープマネージャーは、要求を発しているプロ グラムに、要求を満足できないことを通知する。Alternatively, the heap manager may be supplied by the program making the request. Call the routine that is called. This routine performs the concept of ``compacting the heap.'' It will be explained below. After compaction, the process returns to step 402 and returns, where the heap manager determines that there is enough memory to satisfy the request. Determine whether there is. Satisfy the request after compacting or expanding the heap If there is not enough memory for the requesting process, the heap manager Inform Gram of your inability to fulfill his request.
ステップ404において、マスターブロックが要求を満足するに充分な大きさで ある場合には、プロセスはステップ411ヘスキツプし、そこで、ヒープマネー ジャーは、要求された量のスペースをマスターブロックから転送し、新たなデー タブロックを形成する。マスターブロックから転送されたスペースからデータブ ロックか形成された後に、プロセスはステップ412で終了となり、個々で、ヒ ープマネージャーは、サイズフィールドの下位ビットをクリアすることによりそ の新たに形成されたデータブロックを割り当てられたものとしてマークする。In step 404, the master block is large enough to satisfy the request. If so, the process skips to step 411 where the heap money is The jar transfers the requested amount of space from the master block and stores the new data. Form a tab lock. Data block from space transferred from master block After the lock is formed, the process ends at step 412, where each The group manager clears the lower bits of the size field. Mark the newly formed data block as allocated.
ヒープマネージャーは、その新たに形成されたブロックに対するブロック識別子 を、要求を発しているプログラム経返送する。このブロック識別子は、ブロック のサイズフィールドのすぐ上のメモリを参照する。The heap manager assigns a block identifier to its newly formed block. is sent back to the requesting program. This block identifier is the block Refers to the memory immediately above the size field.
ヱニヱブ三ヱ久9解放: 図5A及び5Bは、本発明の好ましい実施例の流れ線 図である。この流れ線図は、データブロックを割り当て解除即ち解放するために ヒープマネージャーによって使用される方法の概要である。データブロックが解 放されるときには、ヒープにおいてそのすぐ上又はすぐ下に位置した空きブロッ クと組み合わされる。要求を発しているプログラムは、解放されるべきデータブ ロック(現在ブロック)のブロック識別子をヒープマネージャーへ通す。ENIEBU 3EKU 9 RELEASE: FIGS. 5A and 5B show the flow lines of the preferred embodiment of the present invention. It is a diagram. This flow diagram shows how to deallocate or free a data block. An overview of the methods used by the heap manager. data block solved When released, the free block immediately above or below it in the heap combined with The program making the request must Pass the block identifier of the lock (current block) to the heap manager.
プロセスはステップ502で始まり、ヒープマネージャーは、要求を発している プログラムによって与えられたブロック識別子を調整することにより現在ブロッ クの開始部を指すようにポインタをセットする。サイズフィールドはブロックの サイズを含み、ブロックの開始部に配置される。プロセスはステップ503へ進 み、ヒープマネージャーは、現在ブロックのすぐ下にあるブロックの空き暗示フ ィールドをチェックする。空き暗示フィールドは、各データブロックの最後のフ ィールドである。空き暗示フィールドは、ヒープマネージャーが素早くチェック を行ってブロックが空きであるかどうかを調べられるようにする。The process begins at step 502, where the heap manager is issuing a request. The current block can be changed by adjusting the block identifier given by the program. Set the pointer to point to the beginning of the block. The size field is the block's Contains the size and is placed at the start of the block. The process continues to step 503. The heap manager uses the free implicit space for the block immediately below the current block. Check the field. The empty implied field is the last frame of each data block. field. Free implicit fields are quickly checked by the heap manager. to check if a block is free.
現在ブロックのすぐ下のブロックの空き暗示フィールドが符諜値を含む場合には 、ブロックか空きであるかもしれない。空き暗示フィールドか符諜値を含まない 場合には、ブロックが割り当てられる。空き暗示フィールドがブロックが割り当 てられたことを指示する場合には、プロセスは図5Bのブロック510ヘスキツ プする。空き暗示フィールドがブロックが空きであるかもしれないことを指示す る場合には、ヒープマネージャーは更にチェックを行ってブロックが空きである かどうかを判断しなければならない。空き暗示フィールドは、ブロックが空いて いることを保証するものではなく、割り当てられたブロックに含まれたデータは 、ヒープマネージャーによって使用される符諜値のようにみえる。If the empty implied field of the block immediately below the current block contains the intelligence value, then , may be blocked or empty. Empty hint field or does not contain a hint value If so, a block is allocated. A free implied field is allocated by a block. If so, the process returns to block 510 of FIG. 5B. Click. The free hint field indicates that the block may be free. If the block is free, the heap manager performs further checks to ensure that the block is free. have to decide whether or not. The empty implied field indicates that the block is empty. There is no guarantee that the data contained in the allocated block will be , appears to be the intelligence value used by the heap manager.
現在ブロックのすぐ下のブロック(下位ブロック)の空き暗示フィールドがブロ ックが空いているかもしれないことを指示するときには、ヒープマネージャーは 、その下位ブロックにおけるサイズフィールドの下位ビットをチェックしなけれ ばならない。その下位ブロックのスタート位置を見つけるために、ヒープマネー ジャーは、現在ブロックを含むセグメント(現在セグメント)に対する空きリス トをサーチして、下位ブロックを見つ番プるように試みる。ヒープマネージャー は、空きリストを横断するときに、現在ブロックのアドレスの下のアドレスを見 つけるまで、空きリスト内の各ブロックのアドレスをチェックする。見つけたブ ロックのサイズをブロックのアドレスに加えることにより、ヒープマネージャー は、ブロックが現在ブロックのすぐ下にあるかどうか判断することができる。The empty implied field of the block immediately below the current block (lower block) is blocked. When indicating that the heap manager may be free, the heap manager , the lower bits of the size field in its lower block must be checked. Must be. Heap money to find the starting position of its subordinate blocks The free list for the segment that currently contains the block (the current segment) search and try to find the lower block. heap manager looks at addresses below the addresses in the current block when traversing the free list. Check the address of each block in the free list until it is reached. The block I found By adding the size of the lock to the address of the block, the heap manager can determine whether a block is currently directly below it.
下位ブロックが現在セグメントに対する空きリストにない場合には、ヒープマネ ージャーは、現在セグメントの下のセグメントをサーチしなければならない。If the descendant block is not currently on the free list for the segment, the heap manager The manager must search the segments below the current segment.
ヒープマネージャーは、非ゼロポインタエントリーが見つかるまで、現在セグメ ントの下のセグメントに対応する最大空きブロックアレイのエントリーをサーチ する。非セロのポインタエントリーが見つかると、ヒープマネージャーは、その エントリーによって指示された空きリストをサーチし、その空きリストが現在ブ ロックの直前の空きブロックを含むかどうか判断する。The heap manager will continue to hold the current segment until a non-zero pointer entry is found. Search for the largest free block array entry corresponding to the segment under the do. When a non-cello pointer entry is found, the heap manager Searches for the free list pointed to by the entry, and searches for the free list that is currently blocked. Determine whether to include the free block immediately before the lock.
ステップ504ないし505において、ヒープマネージャーは、現在ブロックを 含むセグメント(現在セグメント)に対する空きリストを検査し、現在ブロック のすぐ下に空きデータブロックか存在するかどうか判断する。現在セグメントに 対する空きリストに空きブロックが見つからない場合には、プロセスはステップ 506へ進み、さもなくば、プロセスは図5Bのステップ509ヘスキツプする 。ステップ506ないし507において、ヒープマネージャーは、現在セグメン トエントリーに対応するエントリーの下から始めて最大空きブロックアレイを後 方にサーチし、次の非セロポインタエントリーを見つける。このようなエントリ ーが見つからない場合には、プロセスは図5Bのステップ510ヘスキツプする 。In steps 504-505, the heap manager stores the current block. Check the free list for the containing segment (current segment) and check the current block Determine whether there is a free data block immediately below. Currently in segment If no free block is found in the free list for the Proceed to step 506, otherwise the process skips to step 509 of FIG. 5B. . In steps 506-507, the heap manager determines whether the current segment starting from the bottom of the entry corresponding to the block entry and ending with the largest free block array. Search towards the next non-cello pointer entry. Entries like this If the process is not found, the process skips to step 510 of FIG. 5B. .
非ゼロのポインタエントリーが見つかった場合には、プロセスはステップ5゜8 へ進み、ヒープマネージャーは、最大空きブロックアレイにおける非セロのポイ ンタエントリーによって指示された空きリストを検査して、現在ブロックのすぐ 下に空きブロックが存在するかどうか判断する。このような空きブロックが見つ からない場合には、プロセスは図5Bのステップ510ヘスキツプする。このよ うな空きブロックが見つかった場合には、プロセスは図5Bのステップ509へ 続く。If a non-zero pointer entry is found, the process proceeds to step 5.8. , the heap manager returns the non-cello pointer in the largest free block array. Examine the free list pointed to by the contact entry and check the current block's immediate Determine whether there is a free block below. If you find a free block like this If not, the process skips to step 510 of FIG. 5B. This way If such a free block is found, the process returns to step 509 of FIG. 5B. Continue.
図5Bを参照すれば、ステップ509において、ヒープマネージャーは、現在空 きブロックをそのすぐ下の空きブロックと統合し、そして下位のブロックに対す る空きリストから下位の空きブロックを除去する。Referring to FIG. 5B, in step 509, the heap manager merge the empty block with the free block immediately below it, and Remove lower free blocks from the free list.
次いで、ステップ510ないし5】】において、ヒープマネージャーは、現在ブ ロックの−」二のデータブロック(を位ブロック)を検査して、そのブロックが 空きであるかどうかを判断する。現在ブロックのサイズはサイズフィールドに記 憶されているから、ヒープマネージャーは、現在ブロックのサイズを現在ブロッ クのアドレスに加えることにより現在ブロックのすぐ上のブロックのアドレスを 決定する。アドレスが分かると、ヒープマネージャーは、どのセグメントが上位 ブロックを含むかも判断できる。サイズフィールドの下位ビットは、ブロックが 空きである場合にセットされ、ブロックが割り当てられた場合にクリアされる。Then, in steps 510 to 5], the heap manager Check the second data block (the second block) of the lock and confirm that the block is Determine whether it is vacant. The current block size is recorded in the size field. The heap manager determines the size of the current block. address of the block immediately above the current block by adding it to the address of the block immediately above the current block. decide. Once the address is known, the heap manager determines which segments are top It can also be determined whether blocks are included. The lower bits of the size field indicate whether the block Set if the block is free and cleared if the block is allocated.
上位ブロックが空きである場合には、プロセスはステップ512へ続き、ヒープ マネージャーは、上位ブロックをその空きリストから除去し、そして必要に応じ てサイズツリーを更新する。If the upper block is free, the process continues to step 512 and the heap The manager removes top blocks from its free list and and update the size tree.
ブロックエリアの上部に現在ブロックが位置されると、エンドブロックが現在ブ ロックのすぐ上となる。エンドブロックは割り当てられたものとしてマークされ るので、ヒープマネージャーが現在ブロックをエンドブロックと結合することは ない。エンドブロックは、解放されているブロックの上に常に有効ブロックが存 在するよう保証する。When the current block is positioned at the top of the block area, the end block It will be just above the lock. The end block is marked as allocated. The heap manager currently cannot combine blocks with end blocks because do not have. An end block always has a valid block above it. ensure that it exists.
ステップ513において、ヒープマネージャーは、上位ブロックを現在ブロック と統合する。上位ブロックか空いていない場合には、プロセスはステップ514 にスキップする。ステップ514において、ヒープマネージャーは、サイズフィ ールドの下位ビットを1にセットしモして符諜値を空き暗示フィールドに書き込 むことにより、現在ブロックを空きとしてマークする。次いで、ヒープマネージ ャーは、現在セグメントに対する空きリストに現在ブロックを加え、そしてもし 必要であれば、サイズツリー及び最大空きブロックアレイを更新する。In step 513, the heap manager selects the upper block as the current block. integrate with. If the upper block is not free, the process continues at step 514. Skip to. In step 514, the heap manager Set the lower bit of field to 1 and write the intelligence value to the empty implied field. Mark the current block as free by Then heap management The controller adds the current block to the free list for the current segment, and if Update the size tree and largest free block array if necessary.
ヒープのコンパクト化: ヒープマネージャーが、要求を発しているプログラム からの割り当て要求を満足するに充分な大きなヒープにおいて空きデータブロッ クを位置決めできないときには、ヒープマネージャーはヒープをコンパクト化し 、その要求に対して再試みする。或いは又、ヒープマネージャーは、要求を発し ているプログラムによって供給されるルーチンを呼び出す。このルーチンは、メ モリを解放するためにヒープマネージャーへ他のサービス要求を行うことを含む 適当な処置を実行することができる。通常、要求を発しているプログラムによっ て供給されるルーチンは、何の処置もなく復帰するか(これは割り当て要求をゼ ロ値と共に復帰させる)、又はデータブロックを解放するためのサービス要求も しくはヒープをコンパクト化するためのヒープマネージャーへの要求についての ある組み合わせを実行する。コンパクト化の間に、ヒープマネージャーは、移動 されるべき各データブロックに対し、要求を発しているプログラムによってルー チンが供給されるならば、そのルーチンを呼び出して、その要求を発しているプ ログラムに、データブロックの新たなアドレスがあることを通知する。要求を発 しているプログラムは、次いで、データブロックに対してそれが有しているポイ ンタを変更することができる。Heap compaction: The heap manager is the program issuing the request. Free data blocks in a heap large enough to satisfy allocation requests from When the heap cannot be located, the heap manager compacts the heap. , retry the request. Alternatively, the heap manager issues the request Call a routine supplied by the program that is running. This routine including making other service requests to the heap manager to free memory. Appropriate action can be taken. Usually determined by the program making the request. The routine supplied with ) or a service request to free the data block. or requests to the heap manager to compact the heap. Execute a certain combination. During compaction, the heap manager moves For each block of data that is to be If a command is supplied, call that routine and Notify the program that there is a new address for the data block. issue a request The program that is using the data block then returns the pointer it has to the data block. You can change the printer.
図6A及び6Bは、本発明の好ましい実施例の詳細な流れ線図である。この流れ 線図は、割り当てられた全てのブロックを上位のメモリアドレスに移動して、メ モリの1つの大きな空きブロックをデータブロックエリアの底部に形成すること により、ヒープをコンパクト化するようにヒープマネージャーによって使用され る方法の概要である。その新たな空きブロックは、次いで、マスターブロックに 組み込まれる。或いは又、要求を発しているプログラムは、ヒープに対して更に 大きな又は更に小さなサイズを割り当てることができる。6A and 6B are detailed flow diagrams of a preferred embodiment of the present invention. this flow The diagram moves all allocated blocks to higher memory addresses and Forming one large free block of memory at the bottom of the data block area used by the heap manager to compact the heap. This is an overview of the method. The new free block then becomes the master block. Incorporated. Alternatively, the program making the request may make further requests to the heap. Larger or even smaller sizes can be assigned.
図6Aのステップ601を参照すれば、ヒープマネージャーは、ヒープにおける 全てのデータブロックを走査し、全ての空きブロックを一緒にリンクする。各ブ ロックの初めに位置するサイズフィールドは、ブロックのサイズを含み、これを 用いて、次のブロックが位置決めされる。ヒープマネージャーは、データブロッ クエリアの上部(上位アドレス)からデータブロックエリアの底部(下位アドレ ス)へ空きブロックをリンクする。全てのデータブロックを走査しそして空きブ ロックを一緒にリンクした後に、ステップ602において、ヒープマネージャー は、要求を発しているプログラムかヒープに対して新たなサイズを割り当てたか どうか判断する。要求を発しているプログラムは、ヒープに対してより大きな又 はより小さなサイズを割り当てられるという選択性を有する。要求を発している プログラムがヒープに対して小さなサイズを要求するときには、それにより得ら れるヒープサイズは、要求されたサイズか、又は割り当てられたブロックを含む のに必要なサイズかの大きい方となる。Referring to step 601 of FIG. 6A, the heap manager stores the Scan all data blocks and link all free blocks together. Each block The size field located at the beginning of the lock contains the size of the block and is used to position the next block. The heap manager handles data blocks. From the top of the query area (upper address) to the bottom of the data block area (lower address) Link free blocks to Scan all data blocks and remove free blocks. After linking the locks together, in step 602, the heap manager whether the requesting program allocates a new size for the heap or Please judge. The program making the request has a larger allocation on the heap. has the option of being assigned a smaller size. making a request When a program requests a small size for the heap, it The heap size given is either the requested size or includes allocated blocks. Whichever size you need is the larger one.
要求を発しているプログラムか新たなサイズに対してヒープを割り当てるときに は、制御エリアが新たなサイズのヒープの上部へ移動される。ヒープが新たなサ イズに割り当てられた場合には、プロセスはステップ603へ続き、ヒープマネ ージャーは新たなサイズのヒープに対するセグメントの数を計算し、次いで、ス テップ604において、最大空きブロックアレイ及びサイズツリーの新たな位置 を決定する。When the requesting program allocates the heap for a new size , the control area is moved to the top of the heap of new size. The heap is new If the size is allocated to the heap manager, the process continues to step 603 and The manager calculates the number of segments for the new size heap and then In step 604, the new position of the largest free block array and size tree is determined. Determine.
ヒープが新たな小さなサイズに対して割り当てられたときには、あたかもヒープ がサイズを変化しなかったかのように、コンパクト化が最初に実行される。次い で、この最初の段階の後に、コンパクト化され割り当てられたブロックの全グル ープがその最初の位置まで移動される。この最終的な移動のソースと行き先との 間の差は、シフトダウン量と称する。ヒープがより大きくされるか又は同じサイ ズを保つようにされるときには、シフトダウン量がセロとなる。ヒープが新たな サイズに対して割り当てられなかった場合には、プロセスはステップ602から ステップ605ヘスキツプする。When the heap is allocated to a new smaller size, it is treated as if the heap A compaction is performed first as if had not changed size. Next and after this first stage, the entire group of compacted and allocated blocks is the loop is moved to its first position. The source and destination of this final movement The difference between them is called the downshift amount. The heap can be made larger or the same size. When the engine is forced to maintain the same position, the downshift amount becomes zero. new heap If not allocated for the size, the process continues from step 602. Skip to step 605.
ステップ605において、ヒープマネージャーは、空きブロックのリンクされた リストを走査し、このように走査された空きスペースの合計量を表す値を各ブロ ックに記憶する。空きスペースの合計量は、各空きブロック内に配置された空き スペースフィールドに記憶される。この同じスペースが空き暗示フィールド及び 空きスペースフィールドに使用されるのか好ましい。この値は、各特定の空きブ ロックの下の各割り当てられたブロックがコンパクト化の間に移動される量を表 す。In step 605, the heap manager determines the free block's linked It traverses the list and returns a value for each block representing the total amount of free space thus traversed. memorize it in the book. The total amount of free space is the free space placed within each free block. Stored in the space field. This same space is empty for implied fields and Free space is preferably used for fields. This value is Displays the amount by which each allocated block under a lock is moved during compaction. vinegar.
ステップ606ないし610において、ヒープマネージャーは、メモリの各割り 当てられたブロックがコンパクト化の間に移動される敬を決定し、そしてそれに 応じてこれらブロックに対するハンドルを更新する。/)ノドルは、空きである か又は割り当てられたものであり、即ち割り当てられたハンドルは、割り当てら れたブロックに対する間接的な参照を含む。ハンドルは、図2Bに示された/1 ンドルブロック210に記憶される。ステップ606において、ヒープマネージ ャーは、ハンドルブロックを走査し、次に割り当てられるハンドルであって、最 初のもので始まるハンドルを選択する。In steps 606-610, the heap manager Determines how far the affected blocks are moved during compaction, and Update handles to these blocks accordingly. /) The noddle is empty. or allocated, i.e. the allocated handle is Contains an indirect reference to the block that was created. The handle is shown in Figure 2B /1 is stored in the handle block 210. In step 606, the heap manager The handler traverses the handle block and selects the next assigned handle and the Select handles starting with the first one.
ステップ607において、ヒープマネージャーは、全てのハンドルが選択された かどうか判断する。全てのハンドルか選択されていない場合には、プロセスはス テップ608へ続く。ステップ608において、ヒープマネージャーは、その選 択されたハンドルにより参照された割り当てられたブロックを選択する。ステッ プ609において、ヒープマネージャーは、その選択されたブロックの上の第1 の空きブロックを位置決めするように試みる。選択されたブロックのトに空きブ ロックがない場合には、プロセスはステップ606ヘループして戻り、ヒープマ ネージャーは、次の割り当てられたハンドルを選択する。ヒープマネージャーは 、どのセグメントがその選択されたブロックを含んでいるかを最初に判断するこ とにより空きブロックを位置決めする。次いで、ヒープマネージャーは、その、 トのセグメント又は選択されたブロックを含んでいるセグメントを含むセグメン トに対応する非セロポインタエントリーに対し最大空きブロックアレイをサーチ する。In step 607, the heap manager determines that all handles have been selected. judge whether If all handles are selected, the process will Continue to step 608. In step 608, the heap manager Selects the allocated block referenced by the selected handle. Step At step 609, the heap manager stores the first Attempts to locate a free block in . An empty block is placed next to the selected block. If there is no lock, the process loops back to step 606 and Manager selects the next allocated handle. The heap manager , first determine which segment contains that selected block. Position the empty block by The heap manager then segment containing the selected block or the segment containing the selected block. Search the largest free block array for non-cello pointer entries corresponding to do.
非セロのポインタアレイか見つかると、ヒープマネージャーは、その非セロのポ インタによって示された空きリストをサーチして、ハンドルにより参照されたブ ロックの最下位アドレスの空きブロックを位置決めする。このときの空きリスト が、ステップ601で既に形成された空きブロックのリストであることに注意さ れたい。空きブロックが位置決めされると、ステップ601において、ヒープマ ネージャーは、選択されたハンドルに記憶されたアドレスに、空きブロックの空 きスペースフィールドの値からシフトダウン係数を引いたものを加えることによ り、そのアドレスを更新する。ヒープマネージャーは、割り当てられたブロック に対する全てのハンドルが選択されて更新されるまでステップ606ないL61 0を繰り返す。If a non-zero pointer array is found, the heap manager Searches the free list pointed to by the interface and returns the block referenced by the handle. Locate the free block at the lowest address of the lock. Free list at this time Note that is the list of free blocks already formed in step 601. I want to be. Once the free block is located, in step 601 the heap map is The manager fills the empty block at the address stored in the selected handle. by adding the value of the space field minus the downshift factor. and update its address. The heap manager manages allocated blocks Step 606 does not occur until all handles for L61 have been selected and updated. Repeat 0.
図6Bを参照すれば、ステップ611ないし613において、ヒープマネージャ ーは、割り当てられたブロックをより上位のアドレスへ移動し、全ての空きブロ ックをデータブロックエリアの底部に累積させる。ステップ611において、ヒ ープマネージャーは、ステップ601で発生されたリンクされたリストにおける 最初のもので開始して、次の空きブロックを選択する。各空きブロックは、空き ブロックを含むその七の空きスペースの量を指示する値を空きスペースフィール ドに含んでいる。ステップ612において、ヒープマネージャーは、全ての空き ブロックか走査されたかどうかを決定する。全ての空きブロックが走査されてい ない場合には、ステップ613において、ヒープマネージャーは、各々の割り当 てられたブロックを、選択された空きブロックとその下の空きブロックとの間で 新たな上位アドレスに移動する。新たなアドレスは、古いアドレスを、選択され た空きブロックの空きスペースフィールドに記憶された値に加えることにより計 算される。Referring to FIG. 6B, in steps 611 to 613, the heap manager moves allocated blocks to higher addresses and removes all free blocks. Accumulate blocks at the bottom of the data block area. In step 611, In the linked list generated in step 601, the group manager Select the next free block, starting with the first one. Each free block is The Free Space field contains a value that indicates the amount of free space in that seven blocks. It is included in the code. In step 612, the heap manager stores all free Determine whether a block has been scanned. all free blocks are scanned If not, in step 613 the heap manager between the selected free block and the free block below it. Move to a new higher address. The new address is selected over the old address. is calculated by adding it to the value stored in the Free Space field of the free block that was created. calculated.
ヒープマネージャーは、全ての空きブロックが走査されそして割り当てられたブ ロックか適当な徴だけ−E方に移動されてしまうまで、ステップ611ないし6 13を繰り返す。全ての空きブロックが走査された後に、ステップ614におい て、ヒープマネージャーは、全ての割り当てられたブロックを、シフトダウン係 数がもしあればこれによって指示された最終位置まで移動する。これにより生じ る空きスペースで、データブロックエリアの底部に累積された空きスペースは、 ステップ615においてマスターブロックに加えられる。ステップ616におい て、サイズツリー及び最大空きブロックアレイは、もはやヒープに空きブロック がないことを下すように再初期化される。The heap manager scans all free blocks and Steps 611 to 6 until the lock or other appropriate sign is moved toward E. Repeat step 13. After all free blocks have been scanned, in step 614 The heap manager then shifts all allocated blocks to If there is a number, move to the final position specified by this number. This causes The free space accumulated at the bottom of the data block area is It is added to the master block in step 615. Step 616 Smell The size tree and max free block array no longer contain free blocks in the heap. It is reinitialized so that it does not exist.
図7A及び7Bは、コンパクト化プロセスの一例を示すのに用いられる概略図で ある。図7Aは、サイズツリー700、最大空きブロックアレイ7101データ ブロツクアレイ730、及びハンドルブロック750を、コンパクト化の前の状 態で示す概略図であり、一方、図7Bは、サイズツリー7001最大空きブロッ クアレイ710、データブロックアレイ730、マスターブロック740及びハ ンドルブロック750を、コンパクト化の後の状態で示す概略図である。ハンド ブロック750は、セグメント0の底部に位置されるのが好ましいか、この例の 説明1−、セグメント番号を参照せずに示されている。データブロックエリア7 30の破線はセグメント境界を示し、一方、実線はブロック境界を示している。Figures 7A and 7B are schematic diagrams used to illustrate an example of the compaction process. be. FIG. 7A shows the size tree 700, maximum free block array 7101 data The block array 730 and the handle block 750 are in their state before compaction. 7B is a schematic diagram showing the size tree 7001 maximum free block. square array 710, data block array 730, master block 740 and hardware block array 710, data block array 730, master block 740 and FIG. 7 is a schematic diagram showing the handle block 750 in a state after compaction. hand Block 750 is preferably located at the bottom of segment 0, or in this example Description 1 - Shown without reference to segment numbers. Data block area 7 The dashed lines at 30 indicate segment boundaries, while the solid lines indicate block boundaries.
データブロックエリア730は、8つのセグメントに分割される。Data block area 730 is divided into eight segments.
この例では、要求を発するプログラムは、サイズ10のメモリブロックに対する 割り当て要求をなす。図7Aを参照すれば、この割り当て要求は失敗となる。In this example, the program making the request is for a block of memory of size 10. Make quota requests. Referring to FIG. 7A, this allocation request fails.
というのは、サイズツリー700のルートノード701で示されたように、使用 できる最大空きブロックのサイズが6だからである。更に、マスタープロ・ツク はヒープマネージャーか空きスペースを転送するには小さ過ぎる。データプロ・ ツクエリア730は、空きブロックF O−F 3と、割り当てられたブロック AO−A8を備えている。ハンドルブロック750は、割り当てられたプロ・ツ クAO−A8の位置を各々識別するハンドルHO−H8を含む。各ブロックのサ イズは、各ブロックの第1フイールドであるサイズフィールドに記憶される。例 えば、ブロックAOのサイズは6である。This is because, as indicated by the root node 701 of the size tree 700, the usage This is because the maximum available free block size is 6. In addition, Master Pro Tsuku is too small for the heap manager to transfer free space. data pro The storage area 730 stores empty blocks FO-F3 and allocated blocks. Equipped with AO-A8. The handle block 750 is The handles HO-H8 each identify the position of the handles HO-A8. Each block's support The size is stored in the first field of each block, the size field. example For example, the size of block AO is 6.
コンパクト化の目的は、データブロックエリア730における全ての空きブロッ クを統合し、マスターブロックに加える。これを行うために、割り当てられたブ ロックAO−A7を上位のアドレスに物理的に移動しなければならない。割り当 てられたブロックA8は、それより上に空きブロックが配置されていないので移 動されない。各々の割り当てられたブロックを移動しなければならない量を決定 するために、ヒープマネージャーは、先ず、全てのデータブロックを走査し、そ してデータブロックエリアの上部から底部へ空きブロックFO−F3を一緒にリ ンクすることにより空きブロックのリンクされたリストを形成する。各々の空き ブロックは、次にF位の空きブロックに対するポインタを含んでいる。このポイ ンタは、サイズフィールドの後に配置されるのが好ましい。次いで、ヒープマネ ージャーは、空きブロックのリンクされたリストを走査し、このように走査した 空きブロックの累積量を表す値を各ブロックに記憶する。この値は、空きスペー スフィールドに記憶される。The purpose of compaction is to remove all free blocks in the data block area 730. merge blocks and add them to the master block. To do this, the assigned block Lock AO-A7 must be physically moved to a higher address. Allocation The moved block A8 cannot be moved because there is no empty block above it. Not moved. Determine the amount by which each allocated block must be moved To do this, the heap manager first scans all data blocks and and then move the empty blocks FO-F3 together from the top to the bottom of the data block area. form a linked list of free blocks. each vacancy The block contains a pointer to the next F free block. This point Preferably, the size field is placed after the size field. Next, heap management The manager traverses a linked list of free blocks, traversing it like this A value representing the cumulative amount of free blocks is stored in each block. This value is the free space Memorized in field.
例えば、ヒープマネージャーは、空きブロックF3がサイズ4を有しそしてこの ように走査した空きスペースの黴か4であるから、空きブロックF3の空きスペ ースフィールドに4を記憶する。次いで、ヒープマネージャーは、空きブロック F3のサイズと空きブロックF2のサイズの和を表す10を空きブロックF2の 空きスペースフィールドに記憶する。ヒープマネージャーは、空きブロックF1 及びFOの空きスペースフィールドに各々12及び16を記憶する。空きブロッ クのリンクされたリストにおける最後の空きブロックの空きスペースフィールド に記憶される値は、データブロックエリアにおける空きスペースの合計量を表し ている。For example, the heap manager assumes that free block F3 has size 4 and this Since the empty space scanned as follows is 4, the empty space of empty block F3 is Store 4 in the space field. The heap manager then uses the free blocks 10, which represents the sum of the size of F3 and the size of free block F2, is the size of free block F2. Store in free space field. The heap manager uses free block F1 and store 12 and 16 in the free space field of FO, respectively. empty block free space field of the last free block in a linked list of blocks The value stored in represents the total amount of free space in the data block area. ing.
各空きブロックを含むそれより上の空きスペースの獣を決定した後であって、各 割り当てられたブロックを移動する前に、ヒープマネージャーはハンドルHO− H8を更新する。上記したように、ハンドルは、メモリの割り当てられたブロッ クの識別子である。割り当てられたブロックに対するハンドルを更新するために 、ヒープマネージャーは、割り当てられたブロックが移動されるときにその割り 当てられたブロックのアドレスかどれほど変化するかを計算する。空きブロック の空きスペースフィールドにJ己憶された値は、その空きブロックと次に下位の 空きブロックとの間にある各割り当てられたブロックを移動しなければならない 量である。例えば、割り当てられたブロックA3−A3は、空きブロックF2の 空きスペースフィールドに記憶された値からシフトダウン量、この場合は0であ る、を引いた10だけ、上方に移動される。After determining the beast of free space above that containing each free block, each Before moving an allocated block, the heap manager handles HO- Update H8. As mentioned above, a handle is an allocated block of memory. This is the identifier of the To update the handle to the allocated block , the heap manager handles the allocation of allocated blocks as they are moved. Calculate how much the address of the assigned block changes. empty block The value stored in the free space field of the block is the value stored in the free space field of that free block and the next Each allocated block between it and a free block must be moved It's the amount. For example, allocated blocks A3-A3 are of free block F2. The amount of downshift from the value stored in the free space field, which in this case is 0. is moved upward by 10, minus .
ヒープマネージャーは、割り当てられたブロックA5に対するハンドルである第 1ハンドルH5を選択する。ブロックA5のアドレスに基づいて、ヒープマネー ジャーは、どのセグメントがブロックA5を含むかを決定する。ブロックA5は アドレス30でスタートするので、セグメント3がブロックA5を含む。次いで 、ヒープマネージャーは、最大空きブロックアレイ710のエントリー723( このエントリー723はセグメント3に対応する)を見て、セグメント3に空き ブロックがあるかどうかを判断する。エントリー723は、セグメント3に空き ブロックがないことを指示するゼロポインタを含んでいる。The heap manager has a handle to the allocated block A5. 1 Select handle H5. Heap money based on the address of block A5 determines which segment contains block A5. Block A5 is Starting at address 30, segment 3 includes block A5. then , the heap manager selects entry 723 ( This entry 723 corresponds to segment 3). Determine whether there is a block. Entry 723 is empty in segment 3. Contains a zero pointer indicating that there are no blocks.
ヒープマネージャーは、次いで、セグメント4に対するエントリーでスタートし て最大空きブロックアレイ710をサーチし、第1の非セロポインタエントリー をサーチする。セグメント4に対応するエントリー724は、非セロポインタエ ントリーを含む。ヒープマネージャーは、エントリー724により指示された空 きブロックでスタートして空きブロックのリンクされたリストをサーチし、割り 当てられたブロックA5のアドレスに最も近く且つそれより大きいアドレスをも つ空きブロックをサーチする。エントリー724は空きブロックF2を指す。The heap manager then starts with an entry for segment 4. search the largest free block array 710 and find the first non-cello pointer entry. Search for. Entry 724 corresponding to segment 4 is a non-cello pointer. Including entries. The heap manager uses the empty space indicated by entry 724. Start with a free block, search the linked list of free blocks, and assign The address closest to and larger than the address of the assigned block A5 is also Search for one free block. Entry 724 points to free block F2.
空きブロックF2は、割り当てられたブロックA5の旧に配置されている。ヒー プマネージャーは、空きブロックF2の空きスペースフィールドに記憶された値 (10)を割り当てられたブロックA5のアドレス(30)に加えそしてシフト ダウン量を差し引くことによってハンドルH5を更新する。その結果が40であ り、これは、割り当てられたブロックA5の移動後のアドレスである。この新た なアドレスは、図7Bに示すように、ハンドルH5に記憶される。残りのハンド ルを更新するようにヒ記プロセスが繰り返される。Empty block F2 is placed before allocated block A5. Hee The manager stores the value stored in the free space field of free block F2. Add (10) to address (30) of allocated block A5 and shift The handle H5 is updated by subtracting the amount of down. The result is 40. This is the address after the movement of the allocated block A5. This new The address is stored in the handle H5, as shown in FIG. 7B. remaining hand The process described above is repeated to update the file.
全てのハンドルが更新された後に、ヒープマネージャーは各割り当てられたブロ ックを物理的に移動する。ヒープマネージャーは、空きブロックのリンクされた リストにおいて第1の空きブロックF3を選択し、空きブロックF3とリンクさ れたリストの次の空きブロックである空きブロックF2との間にどの割り当てら れたブロックがあるかを決定する。ヒープマネージャーは、空きブロックF3の 空きスペースフィールドに記憶された量だけ全ての割り当てられたブロックを空 きブロックF3とF2との間で一ヒ方に移動する。それ故、割り当てられたブロ ックA7及びA6は、4単位だけ一ヒ方に移動される。次いで、ヒープマネージ ャーは、次の空きブロックF2を選択する。空きブロックF2はその空きスペー スフィールドに値10を含んでいるので、空きブロックF2とFlとの間の全て の割り当てられたブロック(割り当てられたブロックA5−A3)が10単位だ け上方に移動される。このプロセスは、全ての割り当てられたブロックが適当な 量上方に移動されてしまうまで続く。割り当てられたプログラム8は、その上に 空きスペースがないので移動されない。ヒープがより小さくされた場合には、ブ ロックAO−A8がシフトダウン量だけ下方に移動される。After all handles have been updated, the heap manager updates each allocated block. physically move the rack. The heap manager links free blocks Select the first free block F3 in the list and link it with free block F3. Which allocation is made between free block F2, which is the next free block in the list? Determine if there are any blocks that have been The heap manager has a free block F3. Empty all allocated blocks by the amount stored in the free space field. move in one direction between blocks F3 and F2. Therefore, the assigned blog Books A7 and A6 are moved to one side by 4 units. Then heap management The player selects the next free block F2. Empty block F2 is the empty space Since the field contains the value 10, all free blocks between F2 and Fl The allocated blocks (allocated blocks A5-A3) are 10 units. is moved upward. This process ensures that all allocated blocks are This continues until it is moved upwards. The assigned program 8 is It will not be moved because there is no free space. If the heap is made smaller, block Lock AO-A8 is moved downward by the downshift amount.
図7Bはコンパクト化の結果を示している。データブロックエリア730は、割 り当てられたブロックAO−A8を含み、これらの割り当てられたブロック間に は空きスペースはない。図7Aの空きブロックF O−F 3は、図7Bのマス ターブロック740に統合されている。ハンドルブロック750は、ハンドルH 0−H8を含んでいる。サイズツリー700及び最大空きブロックアレイ710 は再初期化されている。というのは、データブロックアレイ730が空きブロッ クを含んでいないからである。Figure 7B shows the compaction results. The data block area 730 is including allocated blocks AO-A8, and between these allocated blocks. There is no free space. Empty block F O-F 3 in Figure 7A is the square in Figure 7B. integrated into the turret block 740. The handle block 750 is a handle H Contains 0-H8. Size tree 700 and largest free block array 710 has been reinitialized. This is because data block array 730 has empty blocks. This is because it does not include
デバッギング二 本発明は、要求を発しているプログラムによって正しく更新さ れなかったポインタを位置決めするための方法も提供する。要求を発しているプ ログラムは、時々、ポインタを使用して、割り当てられたブロックを識別するこ とがある。割り当てられたブロックか移動されるときにこれらポインタが市しく 更新されるよう確保するために、本発明は、割り当てられたブロックを自動的に 移動するデバッギングモードを提供する。実際に、ヒープは、いかなるポインタ エラーも表面に押しやるよう「シェーク」される。ヒープのシL−りがイネーブ ルされたときには、ヒープマネージャーは、割り当て要求を満足した後に所定量 だけ全てのデータブロックを移動する。各々の割り当てられたブロックが移動さ れるときに、要求を発しているプログラムがその移動されたブロックに対して有 しているポインタを更新するためにルーチン(要求を発しているプログラムによ って任意に供給される)か呼び出される。Debugging 2 The present invention ensures that the program that is making the request is correctly updated. It also provides a method for locating pointers that are not located. The program making the request Programs sometimes use pointers to identify allocated blocks. There is. These pointers become invalid when the allocated block is moved. To ensure that the allocated blocks are updated, the invention automatically Provides a navigable debugging mode. In fact, the heap does not store any pointers. Errors are also ``shaken'' to push them to the surface. Heap storage enabled When allocated, the heap manager allocates a predetermined amount after satisfying an allocation request. only move all data blocks. Each allocated block is moved when the requesting program has access to the moved block. routine (by the program making the request) to update the pointer (supplied arbitrarily) or called.
全てのブロックが最大社移動された後に、これらブロックはそのスタート位置ま で戻される。この「ヒープシェイク」の移動スペースは、データブロックエリア の上に配置されたエンドブロックに維持されるのが好ましい。エンドブロックは 、要求を発しているプログラムに決して割り当てられず、そしてマスターブロッ クは、ヒープシェイクをサポートするために現在必要とされる以上に決して減少 されない。各「シェイク」の間に、内部の空きブロックポインタは、全て、空き ブロックを走査して所定のシェイク量を加算又は減算することにより更新される 。次いで、各データブロック(割り当てられたもの及び空きのもの)は、その新 たな位置に移動される。最後に、割り当てられたブロックに対する全てのハンド ルは、定数を加算又は減算することにより新たな値に更新される。サイズツリー 、最大空きブロックアレイ及び各セグメントの空きリストを更新する必要性を防 止するために、各ヒープシェイクの後に更新される調整可能なベースからセグメ ントアドレスが計算される。After all blocks have been moved, these blocks will be moved back to their starting position. It will be returned. The movement space of this "heap shake" is the data block area Preferably, it is maintained in an end block located on top of the end block. The end block , never allocated to the requesting program, and the master block heap shake is never reduced beyond what is currently required to support heap shaking. Not done. During each "shake", all internal free block pointers are Updated by scanning the block and adding or subtracting a predetermined shake amount . Each data block (allocated and free) is then moved to a different position. Finally, all hands for the allocated block is updated to a new value by adding or subtracting a constant. size tree , prevents the need to update the maximum free block array and the free list for each segment. segment from a tunable base that is updated after each heapshake to address is calculated.
以上、本発明の方法及びシステムを好ましい実施例について説明したが、本発明 はこの実施例に限定されるものではない。本発明の範囲内での変更が当業者に明 らかであろう。従って、本発明の範囲は、請求の範囲のみによって限定されるも のとする。Although the method and system of the present invention have been described above with reference to preferred embodiments, the present invention is not limited to this example. Modifications within the scope of the invention will be apparent to those skilled in the art. It will be clear. Therefore, the scope of the invention should be limited only by the claims. To be.
Claims (14)
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US91959192A | 1992-07-24 | 1992-07-24 | |
US07/919,591 | 1992-07-24 | ||
PCT/US1993/007021 WO1994002898A1 (en) | 1992-07-24 | 1993-07-26 | Computer method and system for allocating and freeing memory |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH06511582A true JPH06511582A (en) | 1994-12-22 |
Family
ID=25442342
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP6504753A Pending JPH06511582A (en) | 1992-07-24 | 1993-07-26 | Computer method and system for allocating and freeing memory |
Country Status (6)
Country | Link |
---|---|
US (1) | US5561786A (en) |
EP (1) | EP0606461B1 (en) |
JP (1) | JPH06511582A (en) |
CA (1) | CA2119788C (en) |
DE (1) | DE69327089T2 (en) |
WO (1) | WO1994002898A1 (en) |
Families Citing this family (159)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5682497A (en) * | 1993-09-28 | 1997-10-28 | Intel Corporation | Managing file structures for a flash memory file system in a computer |
US6131150A (en) * | 1993-10-05 | 2000-10-10 | Digital Equipment Corporation | Scaled memory allocation system |
ES2176214T3 (en) * | 1994-09-19 | 2002-12-01 | Siemens Ag | MEMORY ADMINISTRATION SYSTEM OF A COMPUTER SYSTEM. |
CA2136154C (en) * | 1994-11-18 | 1999-08-24 | Jay William Benayon | User control of multiple memory heaps |
JP3464836B2 (en) * | 1995-01-19 | 2003-11-10 | 富士通株式会社 | Memory management device for storage device |
US5897660A (en) * | 1995-04-07 | 1999-04-27 | Intel Corporation | Method for managing free physical pages that reduces trashing to improve system performance |
US5787447A (en) * | 1995-05-08 | 1998-07-28 | Sun Microsystems, Inc. | Memory allocation maintaining ordering across multiple heaps |
US5742797A (en) * | 1995-08-11 | 1998-04-21 | International Business Machines Corporation | Dynamic off-screen display memory manager |
US5897662A (en) * | 1995-08-18 | 1999-04-27 | International Business Machines Corporation | Pseudo-random address generation mechanism that reduces address translation time |
US5835959A (en) * | 1995-12-01 | 1998-11-10 | Sand Technology Systems International, Inc. | Memory management system and method using dual indexing structures |
DE69637329T2 (en) * | 1995-08-31 | 2008-10-09 | Sand Technology Inc., Westmount | STORAGE MANAGEMENT SYSTEM AND METHOD |
US6016535A (en) * | 1995-10-11 | 2000-01-18 | Citrix Systems, Inc. | Method for dynamically and efficiently caching objects by subdividing cache memory blocks into equally-sized sub-blocks |
US6081623A (en) * | 1995-10-11 | 2000-06-27 | Citrix Systems, Inc. | Method for lossless bandwidth compression of a series of glyphs |
US7146479B2 (en) * | 2001-07-18 | 2006-12-05 | City U Research Limited | Method and apparatus of storage allocation/de-allocation in object-oriented programming environment |
US6427147B1 (en) | 1995-12-01 | 2002-07-30 | Sand Technology Systems International | Deletion of ordered sets of keys in a compact O-complete tree |
US5758353A (en) * | 1995-12-01 | 1998-05-26 | Sand Technology Systems International, Inc. | Storage and retrieval of ordered sets of keys in a compact 0-complete tree |
US5689707A (en) * | 1995-12-04 | 1997-11-18 | Ncr Corporation | Method and apparatus for detecting memory leaks using expiration events and dependent pointers to indicate when a memory allocation should be de-allocated |
US5832526A (en) * | 1996-01-24 | 1998-11-03 | Symantec Corporation | Method and apparatus using slack area of file storage structures for file reconstruction |
US5778392A (en) * | 1996-04-01 | 1998-07-07 | Symantec Corporation | Opportunistic tile-pulling, vacancy-filling method and apparatus for file-structure reorganization |
US5784699A (en) * | 1996-05-24 | 1998-07-21 | Oracle Corporation | Dynamic memory allocation in a computer using a bit map index |
US6057857A (en) | 1996-06-12 | 2000-05-02 | Citrix Systems, Inc. | Method for the lossless compression of lines in a distributed computer system |
US5978893A (en) * | 1996-06-19 | 1999-11-02 | Apple Computer, Inc. | Method and system for memory management |
US6424991B1 (en) | 1996-07-01 | 2002-07-23 | Sun Microsystems, Inc. | Object-oriented system, method and article of manufacture for a client-server communication framework |
US6038590A (en) | 1996-07-01 | 2000-03-14 | Sun Microsystems, Inc. | Object-oriented system, method and article of manufacture for a client-server state machine in an interprise computing framework system |
US6434598B1 (en) | 1996-07-01 | 2002-08-13 | Sun Microsystems, Inc. | Object-oriented system, method and article of manufacture for a client-server graphical user interface (#9) framework in an interprise computing framework system |
US6272555B1 (en) | 1996-07-01 | 2001-08-07 | Sun Microsystems, Inc. | Object-oriented system, method and article of manufacture for a client-server-centric interprise computing framework system |
US6304893B1 (en) | 1996-07-01 | 2001-10-16 | Sun Microsystems, Inc. | Object-oriented system, method and article of manufacture for a client-server event driven message framework in an interprise computing framework system |
US5987245A (en) | 1996-07-01 | 1999-11-16 | Sun Microsystems, Inc. | Object-oriented system, method and article of manufacture (#12) for a client-server state machine framework |
US5848246A (en) | 1996-07-01 | 1998-12-08 | Sun Microsystems, Inc. | Object-oriented system, method and article of manufacture for a client-server session manager in an interprise computing framework system |
US5999972A (en) | 1996-07-01 | 1999-12-07 | Sun Microsystems, Inc. | System, method and article of manufacture for a distributed computer system framework |
US6266709B1 (en) | 1996-07-01 | 2001-07-24 | Sun Microsystems, Inc. | Object-oriented system, method and article of manufacture for a client-server failure reporting process |
US6115799A (en) * | 1996-07-19 | 2000-09-05 | Canon Kabushiki Kaisha | Information processing apparatus and associated method for managing a memory using a next fit and for reducing a memory fragmentation problem |
US5949972A (en) * | 1996-08-23 | 1999-09-07 | Compuware Corporation | System for memory error checking in an executable |
US6092168A (en) * | 1996-10-25 | 2000-07-18 | Hewlett-Packard Co. | Data storage system and method for deallocating space by writing and detecting a predefined data pattern |
US5930827A (en) * | 1996-12-02 | 1999-07-27 | Intel Corporation | Method and apparatus for dynamic memory management by association of free memory blocks using a binary tree organized in an address and size dependent manner |
US5930829A (en) * | 1997-03-31 | 1999-07-27 | Bull Hn Information Systems Inc. | Dynamic memory allocation for a random access memory employing separately stored space allocation information using a tree structure |
US5987580A (en) * | 1997-04-04 | 1999-11-16 | Oracle Corporation | Serially reusable execution memory |
US6101580A (en) * | 1997-04-23 | 2000-08-08 | Sun Microsystems, Inc. | Apparatus and method for assisting exact garbage collection by using a stack cache of tag bits |
US5930807A (en) * | 1997-04-23 | 1999-07-27 | Sun Microsystems | Apparatus and method for fast filtering read and write barrier operations in garbage collection system |
US6115782A (en) * | 1997-04-23 | 2000-09-05 | Sun Micosystems, Inc. | Method and apparatus for locating nodes in a carded heap using a card marking structure and a node advance value |
US5903900A (en) * | 1997-04-23 | 1999-05-11 | Sun Microsystems, Inc. | Method and apparatus for optimizing exact garbage collection of array nodes in a carded heap |
US5848423A (en) * | 1997-04-23 | 1998-12-08 | Sun Microsystems, Inc. | Garbage collection system and method for locating root set pointers in method activation records |
US6038572A (en) * | 1997-04-23 | 2000-03-14 | Sun Microsystems, Inc. | Method and apparatus for localizing nodes in a garbage collected carded heap |
US5911144A (en) * | 1997-04-23 | 1999-06-08 | Sun Microsystems, Inc. | Method and apparatus for optimizing the assignment of hash values to nodes residing in a garbage collected heap |
US5893121A (en) * | 1997-04-23 | 1999-04-06 | Sun Microsystems, Inc. | System and method for swapping blocks of tagged stack entries between a tagged stack cache and an untagged main memory storage |
US5900001A (en) * | 1997-04-23 | 1999-05-04 | Sun Microsystems, Inc. | Method and apparatus for optimizing exact garbage collection using a bifurcated data structure |
US5909579A (en) * | 1997-04-23 | 1999-06-01 | Sun Microsystems, Inc. | Method and apparatus for encoding and decoding delta encoded information to locate live pointers in program data stacks |
US5903899A (en) * | 1997-04-23 | 1999-05-11 | Sun Microsystems, Inc. | System and method for assisting exact Garbage collection by segregating the contents of a stack into sub stacks |
US5920876A (en) * | 1997-04-23 | 1999-07-06 | Sun Microsystems, Inc. | Performing exact garbage collection using bitmaps that identify pointer values within objects |
US5915255A (en) * | 1997-04-23 | 1999-06-22 | Sun Microsystems, Inc. | Method and apparatus for referencing nodes using links |
US6094664A (en) * | 1997-05-30 | 2000-07-25 | Sun Microsystems | Method and apparatus for optimizing the null pointer exception in an object-oriented programming environment with statically typed variables |
US6199075B1 (en) | 1997-05-30 | 2001-03-06 | Sun Microsystems, Inc. | Method and apparatus for generational garbage collection of a heap memory shared by multiple processors |
US6105040A (en) * | 1997-06-30 | 2000-08-15 | Sun Microsystems, Inc. | Method and apparatus for managing stored objects |
US6088764A (en) * | 1997-07-14 | 2000-07-11 | International Business Machines Corporation | Method and apparatus for reducing space allocation failures in storage management systems |
GB9717718D0 (en) * | 1997-08-22 | 1997-10-29 | Philips Electronics Nv | Memory management with compaction of data blocks |
US6173291B1 (en) * | 1997-09-26 | 2001-01-09 | Powerquest Corporation | Method and apparatus for recovering data from damaged or corrupted file storage media |
US6047125A (en) * | 1997-10-01 | 2000-04-04 | Sun Microsystems, Inc. | Garbage collection system for improved use of memory by removal of reference conflicts |
US6076151A (en) | 1997-10-10 | 2000-06-13 | Advanced Micro Devices, Inc. | Dynamic memory allocation suitable for stride-based prefetching |
US6065019A (en) * | 1997-10-20 | 2000-05-16 | International Business Machines Corporation | Method and apparatus for allocating and freeing storage utilizing multiple tiers of storage organization |
US6088777A (en) * | 1997-11-12 | 2000-07-11 | Ericsson Messaging Systems, Inc. | Memory system and method for dynamically allocating a memory divided into plural classes with different block sizes to store variable length messages |
US6018789A (en) * | 1997-11-24 | 2000-01-25 | Western Digital Corporation | Disk drive with cache segment providing adaptively managed chunks |
US6490670B1 (en) * | 1998-04-24 | 2002-12-03 | International Business Machines Corporation | Method and apparatus for efficiently allocating objects in object oriented systems |
GB9813592D0 (en) * | 1998-06-25 | 1998-08-19 | Philips Electronics Nv | Dynamic memory space allocation |
US6510504B2 (en) | 1998-06-29 | 2003-01-21 | Oracle Corporation | Methods and apparatus for memory allocation for object instances in an object-oriented software environment |
US6253215B1 (en) | 1998-08-17 | 2001-06-26 | Sun Microsystems | Method, apparatus, and article of manufacture for facilitating resource management for applications having two types of program code |
US6412053B2 (en) * | 1998-08-26 | 2002-06-25 | Compaq Computer Corporation | System method and apparatus for providing linearly scalable dynamic memory management in a multiprocessing system |
DE19841447A1 (en) * | 1998-09-10 | 2000-03-16 | Siemens Ag | Method of transferring data via several parallel interfaces |
US6396838B1 (en) * | 1998-09-28 | 2002-05-28 | Ascend Communications, Inc. | Management of free space in an ATM virtual connection parameter table |
GB2342470A (en) * | 1998-10-09 | 2000-04-12 | Ibm | A memory management system and method for a data processing system |
US6408368B1 (en) | 1999-06-15 | 2002-06-18 | Sun Microsystems, Inc. | Operating system page placement to maximize cache data reuse |
US6366994B1 (en) | 1999-06-22 | 2002-04-02 | Sun Microsystems, Inc. | Cache aware memory allocation |
US6430665B1 (en) * | 1999-06-25 | 2002-08-06 | Sun Microsystems, Inc. | System and method for heuristically allocating memory |
US6381738B1 (en) * | 1999-07-16 | 2002-04-30 | International Business Machines Corporation | Method for optimizing creation and destruction of objects in computer programs |
US6629111B1 (en) * | 1999-10-13 | 2003-09-30 | Cisco Technology, Inc. | Memory allocation system |
US6662310B2 (en) | 1999-11-10 | 2003-12-09 | Symantec Corporation | Methods for automatically locating url-containing or other data-containing windows in frozen browser or other application program, saving contents, and relaunching application program with link to saved data |
US6630946B2 (en) | 1999-11-10 | 2003-10-07 | Symantec Corporation | Methods for automatically locating data-containing windows in frozen applications program and saving contents |
US6631480B2 (en) | 1999-11-10 | 2003-10-07 | Symantec Corporation | Methods and systems for protecting data from potential corruption by a crashed computer program |
EP1250778A2 (en) * | 1999-12-10 | 2002-10-23 | Mosaid Technologies Incorporated | Method and apparatus for longest match address lookup |
US6920543B1 (en) | 1999-12-14 | 2005-07-19 | Genesis Microchip, Inc. | Method and apparatus for performing distributed processing of program code |
US6728853B1 (en) | 1999-12-14 | 2004-04-27 | Genesis Microchip Inc. | Method of processing data utilizing queue entry |
US6742083B1 (en) | 1999-12-14 | 2004-05-25 | Genesis Microchip Inc. | Method and apparatus for multi-part processing of program code by a single processor |
US6775757B1 (en) * | 1999-12-14 | 2004-08-10 | Genesis Microchip Inc. | Multi-component processor |
US6738884B1 (en) | 1999-12-14 | 2004-05-18 | Genesis Microchip Inc. | Method and apparatus for processing data with semaphores |
US6539464B1 (en) * | 2000-04-08 | 2003-03-25 | Radoslav Nenkov Getov | Memory allocator for multithread environment |
US6374340B1 (en) * | 2000-04-14 | 2002-04-16 | Motorola, Inc. | Method of managing memory for a PCI bus |
US6601137B1 (en) * | 2000-04-19 | 2003-07-29 | Western Digital Technologies, Inc. | Range-based cache control system and method |
US6606682B1 (en) * | 2000-04-19 | 2003-08-12 | Western Digital Technologies, Inc. | Cluster-based cache memory allocation |
US6453403B1 (en) * | 2000-05-19 | 2002-09-17 | Sun Microsystems, Inc. | System and method for memory management using contiguous fixed-size blocks |
US6594749B1 (en) * | 2000-05-19 | 2003-07-15 | Sun Microsystems, Inc. | System and method for memory management using fixed-size blocks |
WO2001093525A2 (en) | 2000-05-26 | 2001-12-06 | Citrix Systems, Inc. | Method and system for efficiently reducing graphical display data for transmission over a low bandwidth transport protocol mechanism |
US6971097B1 (en) * | 2000-06-09 | 2005-11-29 | Sun Microsystems, Inc. | Method and apparatus for implementing concurrently running jobs on an extended virtual machine using different heaps managers |
US7966421B2 (en) * | 2000-06-21 | 2011-06-21 | SAtech Group, A.B. Limited Liability Company | Method and apparatus for logically expanding the length of a search key |
AU2001293509A1 (en) * | 2000-10-04 | 2002-04-15 | Bullant Technology Pty Ltd | Data processing structure |
US6697971B1 (en) * | 2000-10-24 | 2004-02-24 | Hewlett-Packard Development Company, L.P. | System and method for detecting attempts to access data residing outside of allocated memory |
US6499094B1 (en) * | 2001-09-14 | 2002-12-24 | Unisys Corporation | Management of memory heap space for data files accessible to programs operating in different addressing modes |
US7409517B2 (en) * | 2001-10-01 | 2008-08-05 | Oracle International Corporation | Dynamic and automatic memory management |
US7499960B2 (en) | 2001-10-01 | 2009-03-03 | Oracle International Corporation | Adaptive memory allocation |
US7028158B1 (en) | 2001-11-02 | 2006-04-11 | Beatty And Company Computing, Inc. | Storage virtualization engine |
TW580619B (en) | 2002-04-03 | 2004-03-21 | Via Tech Inc | Buffer control device and the management method |
US7330956B1 (en) * | 2002-04-16 | 2008-02-12 | Emc Corporation | Bucket based memory allocation |
US9344235B1 (en) * | 2002-06-07 | 2016-05-17 | Datacore Software Corporation | Network managed volumes |
US6985916B2 (en) * | 2002-08-29 | 2006-01-10 | International Business Machines Corporation | Method, system, and article of manufacture for returning physical volumes |
US6954768B2 (en) * | 2002-08-29 | 2005-10-11 | International Business Machines Corporation | Method, system, and article of manufacture for managing storage pools |
AU2003249434A1 (en) * | 2002-08-30 | 2004-03-19 | Koninklijke Philips Electronics N.V. | Dynamic memory management |
US8060680B2 (en) * | 2002-09-16 | 2011-11-15 | Hewlett-Packard Development Company, L.P. | Method of allocating memory |
US7010555B2 (en) * | 2002-10-17 | 2006-03-07 | International Business Machines Corporation | System and method for compacting a computer system heap |
CN100422932C (en) * | 2002-12-31 | 2008-10-01 | 上海科泰世纪科技有限公司 | Processing method for self discribing data object |
US7032090B2 (en) * | 2003-04-08 | 2006-04-18 | International Business Machines Corporation | Method, system, and apparatus for releasing storage in a fast replication environment |
US7124272B1 (en) | 2003-04-18 | 2006-10-17 | Symantec Corporation | File usage history log for improved placement of files in differential rate memory according to frequency of utilizations and volatility of allocation space |
CA2426619A1 (en) * | 2003-04-25 | 2004-10-25 | Ibm Canada Limited - Ibm Canada Limitee | Defensive heap memory management |
CN100343826C (en) * | 2003-04-29 | 2007-10-17 | 华为技术有限公司 | Method for implementing memory management |
US7827375B2 (en) * | 2003-04-30 | 2010-11-02 | International Business Machines Corporation | Defensive heap memory management |
US7356655B2 (en) * | 2003-05-15 | 2008-04-08 | International Business Machines Corporation | Methods, systems, and media for managing dynamic storage |
US6954826B2 (en) * | 2003-05-21 | 2005-10-11 | Freescale Semiconductor, Inc. | Read access and storage circuitry read allocation applicable to a cache |
US7069402B2 (en) * | 2003-06-02 | 2006-06-27 | International Business Machines Corporation | Host-independent incremental backup method, apparatus, and system |
KR100503093B1 (en) * | 2003-08-16 | 2005-07-21 | 삼성전자주식회사 | Method and apparatus managing a memory |
US7519574B2 (en) * | 2003-08-25 | 2009-04-14 | International Business Machines Corporation | Associating information related to components in structured documents stored in their native format in a database |
US8250093B2 (en) | 2003-08-25 | 2012-08-21 | International Business Machines Corporation | Method and system for utilizing a cache for path-level access control to structured documents stored in a database |
US8150818B2 (en) * | 2003-08-25 | 2012-04-03 | International Business Machines Corporation | Method and system for storing structured documents in their native format in a database |
US7792866B2 (en) * | 2003-08-25 | 2010-09-07 | International Business Machines Corporation | Method and system for querying structured documents stored in their native format in a database |
US8775468B2 (en) * | 2003-08-29 | 2014-07-08 | International Business Machines Corporation | Method and system for providing path-level access control for structured documents stored in a database |
US7792880B2 (en) * | 2004-01-05 | 2010-09-07 | International Business Machines Corporation | Method and apparatus for efficient implementation of discontiguous objects |
US7587566B2 (en) * | 2004-02-20 | 2009-09-08 | Microsoft Corporation | Realtime memory management via locking realtime threads and related data structures |
US7546588B2 (en) * | 2004-09-09 | 2009-06-09 | International Business Machines Corporation | Self-optimizable code with code path selection and efficient memory allocation |
US7398369B2 (en) * | 2004-10-28 | 2008-07-08 | International Business Machines Corporation | Memory leakage management |
US20060173877A1 (en) * | 2005-01-10 | 2006-08-03 | Piotr Findeisen | Automated alerts for resource retention problems |
US8171169B2 (en) | 2005-03-14 | 2012-05-01 | Citrix Systems, Inc. | Method and apparatus for updating a graphical display in a distributed processing environment |
US8423673B2 (en) | 2005-03-14 | 2013-04-16 | Citrix Systems, Inc. | Method and apparatus for updating a graphical display in a distributed processing environment using compression |
US7412466B1 (en) * | 2005-05-31 | 2008-08-12 | Sun Microsystems, Inc. | Offset-based forward address calculation in a sliding-compaction garbage collector |
US7809918B1 (en) * | 2005-07-22 | 2010-10-05 | American Megatrends, Inc. | Method, apparatus, and computer-readable medium for providing physical memory management functions |
US7421453B2 (en) * | 2005-08-16 | 2008-09-02 | International Business Machines Corporation | Asynchronous linked data structure traversal |
US7765528B2 (en) * | 2005-09-21 | 2010-07-27 | Hewlett-Packard Development Company, L.P. | Identifying sources of memory retention |
US7890541B2 (en) * | 2006-02-17 | 2011-02-15 | International Business Machines Corporation | Partition by growth table space |
FR2906380B1 (en) * | 2006-09-27 | 2008-12-19 | Trusted Logic Sa | SYSTEM AND METHOD FOR SECURING DATA. |
US20080148002A1 (en) * | 2006-12-13 | 2008-06-19 | Fleming Matthew D | Method and Apparatus for Allocating A Dynamic Data Structure |
US8037477B2 (en) * | 2007-01-23 | 2011-10-11 | Hewlett-Packard Development Company, L.P. | Efficient detection of sources of increasing memory consumption |
US8972671B2 (en) * | 2007-05-14 | 2015-03-03 | Freescale Semiconductor, Inc. | Method and apparatus for cache transactions in a data processing system |
US20090199126A1 (en) * | 2008-02-06 | 2009-08-06 | International Business Machines Corporation | Method for automatically organizing toolbars for a software application |
US8095766B2 (en) * | 2008-04-07 | 2012-01-10 | International Business Machines Corporation | Method and system for approximating object sizes in an object-oriented system |
US8082415B2 (en) | 2008-07-01 | 2011-12-20 | International Business Machines Corporation | Estimating the size of an in-memory cache |
US8301672B2 (en) * | 2008-09-22 | 2012-10-30 | Advanced Micro Devices, Inc. | GPU assisted garbage collection |
KR20100091853A (en) * | 2009-02-11 | 2010-08-19 | 삼성전자주식회사 | Embedded system conducting a dynamic memory management and memory management method thereof |
US8347055B2 (en) * | 2009-06-30 | 2013-01-01 | Incard S.A. | Method to defrag a memory of an IC card |
US8473900B2 (en) * | 2009-07-01 | 2013-06-25 | Advanced Micro Devices, Inc. | Combining classes referenced by immutable classes into a single synthetic class |
JP4987997B2 (en) * | 2010-02-26 | 2012-08-01 | 株式会社東芝 | Memory system |
US8327109B2 (en) * | 2010-03-02 | 2012-12-04 | Advanced Micro Devices, Inc. | GPU support for garbage collection |
US8225065B2 (en) * | 2010-06-03 | 2012-07-17 | Microsoft Corporation | Hierarchical scalable memory allocator |
US9218135B2 (en) | 2010-06-16 | 2015-12-22 | Microsoft Technology Licensing, Llc | Hierarchical allocation for file system storage device |
US8527544B1 (en) | 2011-08-11 | 2013-09-03 | Pure Storage Inc. | Garbage collection in a storage system |
US9329988B2 (en) * | 2011-08-19 | 2016-05-03 | Nvidia Corporation | Parallel dynamic memory allocation using a nested hierarchical heap |
FR3034540A1 (en) * | 2015-04-03 | 2016-10-07 | Nexedi | METHOD FOR ANALYZING VERY LARGE VOLUMES OF DATA |
EP3109764B1 (en) | 2015-06-23 | 2018-03-14 | Zaklady Urzadzen Komputerowych "ELZAB" S.A. | Flash file system |
US10162552B2 (en) * | 2016-03-31 | 2018-12-25 | EMC IP Holding Company LLC | System and method for quasi-compacting garbage collection |
US10168911B1 (en) * | 2017-06-13 | 2019-01-01 | Sap Se | Defragmentation of persistent main memory |
US11010070B2 (en) * | 2019-01-31 | 2021-05-18 | Ralph Crittenden Moore | Methods for aligned, MPU region, and very small heap block allocations |
US11314428B1 (en) * | 2020-10-09 | 2022-04-26 | Western Digital Technologies, Inc. | Storage system and method for detecting and utilizing wasted space using a file system |
US11580013B2 (en) | 2020-10-30 | 2023-02-14 | Nutanix, Inc. | Free space management in a block store |
CN116431066B (en) * | 2023-03-21 | 2024-04-26 | 深圳市万翼数字技术有限公司 | Data storage method, device, electronic equipment and storage medium |
CN118210825B (en) * | 2024-05-22 | 2024-07-26 | 航天宏图信息技术股份有限公司 | Database query performance optimization method and device, electronic equipment and storage medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4989137A (en) * | 1984-07-12 | 1991-01-29 | Texas Instruments Incorporated | Computer memory system |
US4775932A (en) * | 1984-07-31 | 1988-10-04 | Texas Instruments Incorporated | Computer memory system with parallel garbage collection independent from an associated user processor |
US4989134A (en) * | 1987-03-20 | 1991-01-29 | Hewlett-Packard Company | Method and apparatus for enhancing data storage efficiency |
US4907151A (en) * | 1988-09-30 | 1990-03-06 | Digital Equipment Corporation | System and method for garbage collection with ambiguous roots |
US5321834A (en) * | 1989-11-28 | 1994-06-14 | Xerox Corporation | Method and system for reclaiming unreferenced computer memory space |
US5218698A (en) * | 1991-11-22 | 1993-06-08 | Aerojet-General Corporation | Garbage collection system for a symbolic digital processor |
-
1993
- 1993-07-26 JP JP6504753A patent/JPH06511582A/en active Pending
- 1993-07-26 DE DE69327089T patent/DE69327089T2/en not_active Expired - Lifetime
- 1993-07-26 WO PCT/US1993/007021 patent/WO1994002898A1/en active IP Right Grant
- 1993-07-26 CA CA002119788A patent/CA2119788C/en not_active Expired - Lifetime
- 1993-07-26 EP EP93918396A patent/EP0606461B1/en not_active Expired - Lifetime
-
1994
- 1994-08-24 US US08/372,131 patent/US5561786A/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
CA2119788C (en) | 1996-12-31 |
WO1994002898A1 (en) | 1994-02-03 |
US5561786A (en) | 1996-10-01 |
EP0606461B1 (en) | 1999-11-24 |
EP0606461A1 (en) | 1994-07-20 |
DE69327089D1 (en) | 1999-12-30 |
DE69327089T2 (en) | 2000-04-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH06511582A (en) | Computer method and system for allocating and freeing memory | |
US6757794B2 (en) | Buffering data in a hierarchical data storage environment | |
JP3825479B2 (en) | Method and system for managing a file system using a programmable read only memory capable of erasing flash | |
JP3183901B2 (en) | Memory management method | |
DE69838367T2 (en) | Parallel file system and method for independent recording of metadata | |
US5983329A (en) | Caching virtual memory locks | |
US5408652A (en) | Method and apparatus for heterogenous database access by generating different access procedures for different database data structures | |
US5829041A (en) | Method and apparatus for managing single virtual space suitable for distributed processing | |
JP4299555B2 (en) | Cache control program | |
EP0588502A2 (en) | System and methods for file management | |
US20080010325A1 (en) | Data migration apparatus, method, and program | |
JPH11511272A (en) | System for real-time data transfer and method using sparse files | |
JP2002540502A (en) | Method and apparatus for pointer relocation optimization of virtual memory mapping and transaction management in a database system | |
WO1996041283A1 (en) | System and method for superimposing attributes on hierarchically organized file systems | |
JP2005530242A (en) | Storage system having partitioned movable metadata | |
JPH05210637A (en) | Method of simultaneously controlling access | |
JPH07191891A (en) | Computer method and storage structure for storage of, and access to, multidimensional data | |
EP1091295B1 (en) | Data management system using a plurality of data operation modules | |
JPH01195531A (en) | Logical organization of document within information processing system | |
US7421446B1 (en) | Allocation of storage for a database | |
JPH06139119A (en) | System and method for managing data base | |
JPS62162136A (en) | Simultaneous-updating control system for file with indices in hierarchy structure | |
JP2735684B2 (en) | Cell management method for storage device | |
CN117666934A (en) | Data management method and device based on automatic thin provisioning and electronic equipment | |
JPH04112249A (en) | Memory managing system |